Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2402540pxy; Sun, 2 May 2021 21:51:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiUCCw8mHWrqTmnRShNld8y+0RkLZSGKzbGPTm/fQJskkdfnjJL5g9ui9BLtl+hv9AV2ZG X-Received: by 2002:a17:906:168d:: with SMTP id s13mr14636286ejd.81.1620017500321; Sun, 02 May 2021 21:51:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620017500; cv=none; d=google.com; s=arc-20160816; b=LTgb6ZBXIXlSiQHreaiPrJQFYUld/GyBhvk7y0o74gEwtK47/XJvKYcERrmi7JzskE j8XxNreaHi2TxTb4lPuzTiYTpNpgQ2RVT67I6gIlsZaT5K6H00fFy+7hraAuFx2DJu97 XRuda0Z+LgapHjWj3LFqwFdqnoPQgQKHwO55T7rolT/cmqyJVFjeflb6+N7Kkr80D5Pi R7zd+4tj5w9rj1U/tSRTIsuAxIPzeU1UK44F5ZfBUec4EYKSkY23d33GP9Kv4S94au0Q tCn1kVE8/h7Jh9Rdz4h05iC2MC+KydJSDluzN4VTMSAOWYmHCPNCyeF/Pq8Lk0zUsfiR ruHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XYXs08JSeVO+L0dnBQx3vKeQVAM6AiUQrl0ZvCO1mZY=; b=eIN9NiJ5dvuEjF9ji6OJsyCWwWSX+RMY4MYzfTN5Zs+Ef2MUNcKbMGoYr86lBspLLk /gHZRbMakXWguL6w4MlxG86WlgUcTLb4bzMUViNKi1hn6Du4Gw9uU08bsj/ffFXC2riC H0maZx5v39EoFHP4DRqdlF49QBe69I6az0JGBczRnqwng/Yip/HOv7FwBTHT/jScNMCv 5cxvUHC21IbifV29aNkNtvSejd5pHHLa6XCxPmS6f7n3L94NWE8e3PLr9OCBM7YfdpXb z9F/UBQ4CR+vIP56qbR4J+l2fgPZQeVF2A0kz3DK4JkwKMyp8o9k1N/L3MLKAKrKzPl9 pgHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NsEvbIL3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si7906378ejj.522.2021.05.02.21.51.15; Sun, 02 May 2021 21:51:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NsEvbIL3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230060AbhECEtQ (ORCPT + 99 others); Mon, 3 May 2021 00:49:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:46104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbhECEtQ (ORCPT ); Mon, 3 May 2021 00:49:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 26E3261376; Mon, 3 May 2021 04:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620017303; bh=qe2K2dUFSTQlgYuxLKpqQv9oEVpXzWC972TvWmceQo8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NsEvbIL3Fr3SiFCcxYiI0OzPicwzJwdxaY1zA6ecSslUnUtwWOE3sFeD8+qbBvBcV etoX/WSuUwj7KKQKYqcZIrYMZuGYR+ONL+s5JPj8fFsCD0RmUNRowBpGxOFvHPBxUL 0tMWwlWJVdSAV26Eg/gJrOcXUXSaNoi8HaYf64XU= Date: Mon, 3 May 2021 06:48:21 +0200 From: Greg Kroah-Hartman To: Enzo Matsumiya Cc: linux-leds@vger.kernel.org, linux-block@vger.kernel.org, u.kleine-koenig@pengutronix.de, Jens Axboe , Pavel Machek , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/2] block: export block_class and disk_type symbols Message-ID: References: <20210430183216.27458-1-ematsumiya@suse.de> <20210430183216.27458-2-ematsumiya@suse.de> <20210503023649.a437epxpd7tkgkwx@hyori> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210503023649.a437epxpd7tkgkwx@hyori> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 02, 2021 at 11:37:35PM -0300, Enzo Matsumiya wrote: > On 05/01, Greg Kroah-Hartman wrote: > > On Fri, Apr 30, 2021 at 03:32:10PM -0300, Enzo Matsumiya wrote: > > > Export symbols to be used by _for_each_blk() helper in LED block > > > trigger. > > > > > > Signed-off-by: Enzo Matsumiya > > > --- > > > block/genhd.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/block/genhd.c b/block/genhd.c > > > index 8c8f543572e6..516495179230 100644 > > > --- a/block/genhd.c > > > +++ b/block/genhd.c > > > @@ -1218,6 +1218,7 @@ static void disk_release(struct device *dev) > > > struct class block_class = { > > > .name = "block", > > > }; > > > +EXPORT_SYMBOL(block_class); > > > > > > static char *block_devnode(struct device *dev, umode_t *mode, > > > kuid_t *uid, kgid_t *gid) > > > @@ -1235,6 +1236,7 @@ const struct device_type disk_type = { > > > .release = disk_release, > > > .devnode = block_devnode, > > > }; > > > +EXPORT_SYMBOL(disk_type); > > > > > > #ifdef CONFIG_PROC_FS > > > /* > > > > Please please no. These should not be needed by anything. > > > > And if they really do, they must be EXPORT_SYMBOL_GPL(). > > > > thanks, > > > > greg k-h > > Thanks. I was indeed skeptical about submitting this particular change. > > Do you think it's more acceptable if I implement a for_each_blk() helper > (cf. patch 2 on this series) on block code? > > I couldn't find any other way to do this (get all block devices on the > system), so please let me know if I missed something. Why would you want a list of all block devices in the system? What are you going to do with such a thing? How does the block core handle other random drivers getting references to the things it thinks it controls? thanks, greg k-h