Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2039461rdb; Mon, 9 Oct 2023 10:26:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrEGG9usch/bZ6iEdkzY1GHhoAO2LfRZETgKCOfInN+JHkIxCAmQmH0MeCSG/gEI4sb3RP X-Received: by 2002:a9d:7b52:0:b0:6c2:2bca:7a14 with SMTP id f18-20020a9d7b52000000b006c22bca7a14mr16781023oto.23.1696872383898; Mon, 09 Oct 2023 10:26:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696872383; cv=none; d=google.com; s=arc-20160816; b=yK1Q66rmuOXdvJzlhYTKMtEhEUng5n+EXVRpWHypBRTk6PzRpivjmxE2fOor6IHtbm CIVxJlTLgn8DWORVZMkFAeMALMl/qHGhDQB5uEOBYZhGAE5NmEXl640iyVHPd25ZPEKJ vFogQDKmQh2cAuTP3bJwolNTEbNl8BrZKUjLvx0/COToIIKyPJwhCfPrxcGG3N4T9CP7 nxddmSaF56zsaTUXokL8hi8tc1yTvUyCTstpfTaEqtOX6s1aToGX7cieqSJjqE+FCxxk xcb1OE2xOSHlbv1Elu9wG7RnX3bolNI4m2tc8g5dbiaROr1lWfP7oIy9pHf8LoH4+a0e N4Qw== 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=+99ERTETs1SOs6pbAOMlQDoNcerfqUwnkmaN+AEx1yo=; fh=NbT83JtJShecFIJunlQiWfCMfQCI2HfNkMMDii9gVbs=; b=TfamHoByhYIsGjZceCPYzS9+i3uGOv8HANpwLt/k0CT4ZAnOndi/poKAnwzWJdnG5a tH1qGbHRa2ItmsxDrkoncw9fno0UuiCf7Q2qaFu1okSXDbg4eUscNHPjtXSx7B7fOyse 7cSyNyYnL6GxIfpaITdpjeRv0cRzNnM4GCp+UwS0BZ1axXeGtRmW1TcXo2/Lk8JVyrRj R90exlCR9S+71PC1gZz0oUOIxZmxdCysX0c/xyWod8Vo4jchBbkCByU6HNFHLi9ldQpu 40kmUM/neR9bYdaIZQo2fKqhBvFP/TLqd16JIbASZHTwLIj92IcYL1ipydi0JCsnq2C6 NcUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="LH/vqB4X"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id f17-20020a631011000000b005637e28270fsi1085029pgl.243.2023.10.09.10.26.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 10:26:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="LH/vqB4X"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 93A18805DC64; Mon, 9 Oct 2023 10:26:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377903AbjJIR0F (ORCPT + 99 others); Mon, 9 Oct 2023 13:26:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377529AbjJIR0C (ORCPT ); Mon, 9 Oct 2023 13:26:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21BD09D; Mon, 9 Oct 2023 10:26:01 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0B86C433C8; Mon, 9 Oct 2023 17:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696872360; bh=Xvq7hDU/coDuEsdrXCSvDDCeu4fDcSPbyB2v1f0haJw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LH/vqB4X1j5QvSSkBM6vklj2Pb9c2SspT6NgEyJDP9vbRIpWR6CQ+nJkcsCjQ4Vir 43qqnL24pp98K8WJjk6l/x23d5SHHpCaxfpNhOF9JsbcR9rYVEP68LmxblNqxA33nb 6ckKZ/2qQDECOCthGRjyk9BmKLlvlEvFYD03WIdc= Date: Mon, 9 Oct 2023 19:25:57 +0200 From: Greg Kroah-Hartman To: Max Kellermann Cc: Jens Axboe , "Rafael J. Wysocki" , Borislav Petkov , Tony Luck , James Morse , Mauro Carvalho Chehab , Robert Richter , Jean Delvare , Guenter Roeck , Jason Gunthorpe , Leon Romanovsky , Bart Van Assche , Joerg Roedel , Will Deacon , Robin Murphy , Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny , Keith Busch , Christoph Hellwig , Sagi Grimberg , Alessandro Zummo , Alexandre Belloni , Jiri Slaby , Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , Thomas Gleixner , Peter Zijlstra , Pavel Machek , Lee Jones , Arnd Bergmann , Bjorn Helgaas , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Sebastian Reichel , Krzysztof Kozlowski , Wim Van Sebroeck , "James E.J. Bottomley" , "Martin K. Petersen" , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, nvdimm@lists.linux.dev, linux-nvme@lists.infradead.org, linux-rtc@vger.kernel.org, linux-serial@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-leds@vger.kernel.org, linux-pci@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const Message-ID: <2023100921-that-jasmine-2240@gregkh> References: <20231009165741.746184-1-max.kellermann@ionos.com> <20231009165741.746184-6-max.kellermann@ionos.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231009165741.746184-6-max.kellermann@ionos.com> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 09 Oct 2023 10:26:17 -0700 (PDT) X-Spam-Level: ** On Mon, Oct 09, 2023 at 06:57:39PM +0200, Max Kellermann wrote: > This allows passing arrays of const pointers. The goal is to make > lots of global variables "const" to allow them to live in the > ".rodata" section. I'm all for doing this type of work, but this is going to be rough. You sent patch 6/7 that hit almost all subsystems at once :( Also, the code: > -int driver_add_groups(struct device_driver *drv, const struct attribute_group **groups); > -void driver_remove_groups(struct device_driver *drv, const struct attribute_group **groups); > +int driver_add_groups(struct device_driver *drv, const struct attribute_group *const*groups); > +void driver_remove_groups(struct device_driver *drv, const struct attribute_group *const*groups); > void device_driver_detach(struct device *dev); "*const*groups"? That's a parsing nightmare, really hard for humans to read and understand. Doesn't checkpatch complain about this? thanks, greg k-h