From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6C03C76188 for ; Sun, 21 Jul 2019 12:13:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 79E322064A for ; Sun, 21 Jul 2019 12:13:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="q5QL+RHF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726557AbfGUMND (ORCPT ); Sun, 21 Jul 2019 08:13:03 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:23229 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726188AbfGUMNC (ORCPT ); Sun, 21 Jul 2019 08:13:02 -0400 Received: from mail-ua1-f51.google.com (mail-ua1-f51.google.com [209.85.222.51]) (authenticated) by conssluserg-05.nifty.com with ESMTP id x6LCCvWl011978; Sun, 21 Jul 2019 21:12:58 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com x6LCCvWl011978 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1563711178; bh=MIA0+vFVf3mUGGa03CY80enR4qM7bzkzR410L3fu3TE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=q5QL+RHFEViaW/mMvaiRLzKjwSgbDFxpOxs/RfKREU7HS8r89mC2Bz7zMjVOaXyXn tcMALk0yb+puadsgO9+2y8TVFyRAZ4y0mLCm+cBkvl+tEprAF+7gkmzX8cgn+OYJeS I1sV136C7Hgcgdk00LjWZBn14Xab9lSJwKzufWhEcHDnSMGrjPKmc/uqG/kmhYCRn2 Dqx/mXqAwm5ImwYiX1+4i1CnHusTEZf3G3ZNGaVd588g98vmsQtltf0TjPbzdezDYY 4Z8PoTYL21ClgrHmq3rlcy3Q8zuOy8BZK6I88MDOCTGWAha5Y0Q+Ir4P3N1cLKJpK0 DzewVIvkwKM3A== X-Nifty-SrcIP: [209.85.222.51] Received: by mail-ua1-f51.google.com with SMTP id o2so14278655uae.10; Sun, 21 Jul 2019 05:12:58 -0700 (PDT) X-Gm-Message-State: APjAAAUR7Jmw0z83SSha3vK7PnS7NpS6cqB76g0Fw24RVjSKF/VrpH2G efmLBtClXZx1B4EEaVYkH7appSuaYyRltuC93jc= X-Google-Smtp-Source: APXvYqxuBnjaSyRpGv3ZxRVy/hU0ZW6/IruER15xQdcM9a/uJ7XwnfPu3iofGBzVr2dqeJUH5StCwXqmj4pJ02ZB0yo= X-Received: by 2002:a9f:2265:: with SMTP id 92mr25208724uad.121.1563711177169; Sun, 21 Jul 2019 05:12:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiro Yamada Date: Sun, 21 Jul 2019 21:12:20 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Question] orphan platform data header To: Arnd Bergmann Cc: Ben Dooks , Linux Kernel Mailing List , Linus Torvalds , Greg Kroah-Hartman , DTML , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 21, 2019 at 6:10 PM Arnd Bergmann wrote: > > On Sun, Jul 21, 2019 at 5:45 AM Masahiro Yamada > wrote: > > On Sat, Jul 20, 2019 at 10:55 PM Arnd Bergmann wrote: > > > On Sat, Jul 20, 2019 at 5:26 AM Masahiro Yamada wrote: > > > > So, what shall we do? > > > > > > > > Drop the board-file support? Or, keep it > > > > in case somebody is still using their board-files > > > > in downstream? > >> > > > For this file, all boards got converted to DT, and the old setup > > > code removed in commit ebc278f15759 ("ARM: mvebu: remove static > > > LED setup for netxbig boards"), four years ago, so it's a fairly > > > easy decision to make it DT only. > > > > I see another case, which is difficult > > to make a decision. > > > > For example, drivers/spi/spi-tle62x0.c > > > > This driver supports only board-file, but the board-file > > is not found in upstream. > > > > Unless I am terribly missing something, > > there is no one who passes tle62x0_pdata > > to this driver. > > > > $ git grep tle62x0_pdata > > drivers/spi/spi-tle62x0.c: struct tle62x0_pdata *pdata; > > include/linux/spi/tle62x0.h:struct tle62x0_pdata { > > > > But, removing board-file support > > makes this driver completely useless... > > Adding Ben Dooks to Cc. > > I suspect this driver is completely obsolete and should be removed. > > For some reason, it's not an SPI controller driver like all the other > files in that directory, but implements low-level access to the state > of a particular SPI device. > > However, there should not really be a low-level driver for it that > just exports the pins to user space. It should either be a gpiolib > driver to let other drivers talk to the pins, or a high-level driver that > exposes the intended functionality (watchdog, regulator, ...) > to those respective subsystems. > > Arnd Another example that I have no idea how it works: drivers/net/hamradio/yam.c yam_ioctl() reads data from user-space, but the data structures for ioctl are defined in include/linux/yam.h This header is not exported to user-space since it is outside of the uapi directory. I dug the git history, but it has never exported to user-space in the past. I do not know how user-space programs can pass-in data to the kernel. If we want to fix this, we could move it to include/uapi/linux/yam.h But, if nobody has reported any problem about this, it might be a good proof that nobody is using this driver. Maybe, can we simply drop odd drivers?? -- Best Regards Masahiro Yamada From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48691C76188 for ; Sun, 21 Jul 2019 12:13:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1BC4720659 for ; Sun, 21 Jul 2019 12:13:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ND/87nei"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="q5QL+RHF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BC4720659 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GALaBtgBFaq+VlzdCcOklnB8EGx5V094mNGOCtLOQMM=; b=ND/87nei3LxyVq +nQYIgcbA49Kgrj+V43Xvx+UgGxNfGAnyiwmveZtbrnOxaWbgGCuwvqQZi5Z8+6oYbMaDks5fKMfv xN7bcOg0TnFqSUNuDQQWS8PyePF+Zs7KkbDstHmnQJRmG/c5l6dkFoNM+BoQEoWeoqlSc6P91Sawt iUGn06AuyEmrMp+dSJ78tFzJmNUFXufcjDMwVC6BtUKtTOTnRpMkR9KKx7ZDfYcMmFU8OGfxdMtgt avI71fncquL6LSJJSqdY7F2lINlavxXvCfUj/gRjp/aUUd6yIAuEswaIg2Z2fdR7N3K1fDgITWw63 FoWJOOrVNkSZW6pzTOUg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hpAiJ-00080f-Mv; Sun, 21 Jul 2019 12:13:15 +0000 Received: from conssluserg-05.nifty.com ([210.131.2.90]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hpAiG-00080F-AQ for linux-arm-kernel@lists.infradead.org; Sun, 21 Jul 2019 12:13:14 +0000 Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) (authenticated) by conssluserg-05.nifty.com with ESMTP id x6LCCv4e011977 for ; Sun, 21 Jul 2019 21:12:58 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com x6LCCv4e011977 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1563711178; bh=MIA0+vFVf3mUGGa03CY80enR4qM7bzkzR410L3fu3TE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=q5QL+RHFEViaW/mMvaiRLzKjwSgbDFxpOxs/RfKREU7HS8r89mC2Bz7zMjVOaXyXn tcMALk0yb+puadsgO9+2y8TVFyRAZ4y0mLCm+cBkvl+tEprAF+7gkmzX8cgn+OYJeS I1sV136C7Hgcgdk00LjWZBn14Xab9lSJwKzufWhEcHDnSMGrjPKmc/uqG/kmhYCRn2 Dqx/mXqAwm5ImwYiX1+4i1CnHusTEZf3G3ZNGaVd588g98vmsQtltf0TjPbzdezDYY 4Z8PoTYL21ClgrHmq3rlcy3Q8zuOy8BZK6I88MDOCTGWAha5Y0Q+Ir4P3N1cLKJpK0 DzewVIvkwKM3A== X-Nifty-SrcIP: [209.85.222.46] Received: by mail-ua1-f46.google.com with SMTP id v20so14286848uao.3 for ; Sun, 21 Jul 2019 05:12:58 -0700 (PDT) X-Gm-Message-State: APjAAAVNT2HaHJnNhjSggceGh66jM35kwGhvGuz+XKdwZtL0aYgMRvLO wZe5IvickheD5XXIfUFv1BsQH3PMsfH4CpFxYVA= X-Google-Smtp-Source: APXvYqxuBnjaSyRpGv3ZxRVy/hU0ZW6/IruER15xQdcM9a/uJ7XwnfPu3iofGBzVr2dqeJUH5StCwXqmj4pJ02ZB0yo= X-Received: by 2002:a9f:2265:: with SMTP id 92mr25208724uad.121.1563711177169; Sun, 21 Jul 2019 05:12:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiro Yamada Date: Sun, 21 Jul 2019 21:12:20 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Question] orphan platform data header To: Arnd Bergmann X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190721_051312_610034_BEE5456D X-CRM114-Status: GOOD ( 24.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: DTML , Greg Kroah-Hartman , Linux Kernel Mailing List , Ben Dooks , Linus Torvalds , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Jul 21, 2019 at 6:10 PM Arnd Bergmann wrote: > > On Sun, Jul 21, 2019 at 5:45 AM Masahiro Yamada > wrote: > > On Sat, Jul 20, 2019 at 10:55 PM Arnd Bergmann wrote: > > > On Sat, Jul 20, 2019 at 5:26 AM Masahiro Yamada wrote: > > > > So, what shall we do? > > > > > > > > Drop the board-file support? Or, keep it > > > > in case somebody is still using their board-files > > > > in downstream? > >> > > > For this file, all boards got converted to DT, and the old setup > > > code removed in commit ebc278f15759 ("ARM: mvebu: remove static > > > LED setup for netxbig boards"), four years ago, so it's a fairly > > > easy decision to make it DT only. > > > > I see another case, which is difficult > > to make a decision. > > > > For example, drivers/spi/spi-tle62x0.c > > > > This driver supports only board-file, but the board-file > > is not found in upstream. > > > > Unless I am terribly missing something, > > there is no one who passes tle62x0_pdata > > to this driver. > > > > $ git grep tle62x0_pdata > > drivers/spi/spi-tle62x0.c: struct tle62x0_pdata *pdata; > > include/linux/spi/tle62x0.h:struct tle62x0_pdata { > > > > But, removing board-file support > > makes this driver completely useless... > > Adding Ben Dooks to Cc. > > I suspect this driver is completely obsolete and should be removed. > > For some reason, it's not an SPI controller driver like all the other > files in that directory, but implements low-level access to the state > of a particular SPI device. > > However, there should not really be a low-level driver for it that > just exports the pins to user space. It should either be a gpiolib > driver to let other drivers talk to the pins, or a high-level driver that > exposes the intended functionality (watchdog, regulator, ...) > to those respective subsystems. > > Arnd Another example that I have no idea how it works: drivers/net/hamradio/yam.c yam_ioctl() reads data from user-space, but the data structures for ioctl are defined in include/linux/yam.h This header is not exported to user-space since it is outside of the uapi directory. I dug the git history, but it has never exported to user-space in the past. I do not know how user-space programs can pass-in data to the kernel. If we want to fix this, we could move it to include/uapi/linux/yam.h But, if nobody has reported any problem about this, it might be a good proof that nobody is using this driver. Maybe, can we simply drop odd drivers?? -- Best Regards Masahiro Yamada _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel