Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5572248pxb; Mon, 14 Feb 2022 02:17:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJweS+gRwENCMvm0l4WVn/zKIHusrYAAbzSTIjVAHqUt5HPpdJe/2AYysjKcmYGivJsPf1pE X-Received: by 2002:a63:4e:: with SMTP id 75mr11306420pga.461.1644833856956; Mon, 14 Feb 2022 02:17:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644833856; cv=none; d=google.com; s=arc-20160816; b=Mf+Un5uT0udFUmCQULlvZ37UMdI3eZpit5iXszK8Sc4BNHh6dK7v7AErXyA+2Fnd9e 2YmcN2325OJOvnnBNTT94XlSKVibXyj9nMIKxhfLu9dYm8S56gxwBgfWAUsp0Cpgn6/f MYwu9Eu9cLMdUKum8pi+ng0xTdOcvOEzsbjs2Pzlnv/0w5WVIHw9zFw9FG1MjN/1hI3U ZXZaRlmlCsUuXHX/PtKb+LxfpAJWoccrHC0gY6G5Fwk+eYXSrEJhOB5jSLcmz985Ib6f 6gwKluiWKhrw4JwuVgbsB0VH3COFF5O6sC37+KXGsZDroJW7Kt15NSYUeGFM40FsQumC 34ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=uOYbuLgoQrIJu9nKfMdzzauQRx2lRskPgBFfceJrL3s=; b=lV/7bqneY4pSz2BsJE/jz5VTsjlUpCzds+UQE03h+t+V0F7xWUng1V7TQEv5OM4lHO aeHnQgFGZ0G3WVLIIWeKd/bHyR+exLbbS+pUqe+M7nxQBbgC9tfMK2yLc9odHuTzriID Ex/c4FVFgt2YaM9TJtUTJkR3aJYoPicNJWxcK+MRQQE2J3xYfi0tgbc2hHElR134krHs ZqLAN3yYSQs1icxRAs0ZJxRfrgWceNTYN+lJgZB5y90rmZlp1BKMd3jIFRZa90ivX7x1 i9iS3wdGYyXaPFr7q3nXjWw/gyHTmN6sNUQ6jIXkwQ0izppfNoEOFmIgRa6f1u+lgdKD B3LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fu7YqESr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e4si12407856plx.172.2022.02.14.02.17.23; Mon, 14 Feb 2022 02:17:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fu7YqESr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236312AbiBMNca (ORCPT + 99 others); Sun, 13 Feb 2022 08:32:30 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbiBMNc2 (ORCPT ); Sun, 13 Feb 2022 08:32:28 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0A3665EDF2 for ; Sun, 13 Feb 2022 05:32:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644759141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uOYbuLgoQrIJu9nKfMdzzauQRx2lRskPgBFfceJrL3s=; b=fu7YqESrPM3fhjsu3ou6FdqQeReou+eT1IVouA+eFBUxuar6lJpWZSWpLKNTOPAdn0zFPv l1BcSID+cQ0FSWaay8PbwDmyvhQ+fTsNfwjt/PZZGsuxSuiRQPrxjR0YgTdA/e2uvupx1u GOTwj9Kg3n72qyFMnah4EewgzwzXBrU= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-281-SkjtbCdXNTmkvcyqZekI_Q-1; Sun, 13 Feb 2022 08:32:20 -0500 X-MC-Unique: SkjtbCdXNTmkvcyqZekI_Q-1 Received: by mail-lf1-f69.google.com with SMTP id 27-20020ac25f1b000000b0043edb7bf7e7so4334446lfq.20 for ; Sun, 13 Feb 2022 05:32:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uOYbuLgoQrIJu9nKfMdzzauQRx2lRskPgBFfceJrL3s=; b=ZH8Fjop2gjbWWXprKoyejG843BJfJ/+QhSPRVYJutanIUz4nGdbXwmBDO17O+ZXrRg 4BLDzV9nXAeDJ6w8R32883U38V/vGYDZLDhS+OBISgdXT+RjCxcU49kZ5mhkKmXQQlHx gT183HWWHeFA+v4/dvtw3JEwPv6zfaANpl3yGMVnUZaASVae+nAqnNHFcwmzt2YDwQg5 0ZNLqDoS+hyBmy2glQSNkzcHuy9EQvZDmWPX8KlnguJWUbxj3cW5+srgZj9iQa+Mm17N NnT1E7DHj3VdrLsOF/rrgSpnJXJPg+nY8qrtG5cWGRE6q3czwPs+HFfcEHsCYgy1RQ5H tofA== X-Gm-Message-State: AOAM531Jm7dSSX41ocAEmKRUgGuwISv3kT3drSE0NMfYBmUmQGbArRj3 RlBBF9zS2ZddpC5RGpWmgOU7GoLDIOypmhYAzHalNtK5p7t3Km1SDHxwBusl44pPnd2fPI1E/zE 7EbUVEGc5SCKqNUJq3pVR9KMgas/vulHRWhlBmzk= X-Received: by 2002:a05:6512:3b91:: with SMTP id g17mr7860199lfv.79.1644759139006; Sun, 13 Feb 2022 05:32:19 -0800 (PST) X-Received: by 2002:a05:6512:3b91:: with SMTP id g17mr7860177lfv.79.1644759138845; Sun, 13 Feb 2022 05:32:18 -0800 (PST) MIME-Version: 1.0 References: <20220209171118.3269581-1-atomlin@redhat.com> <6d6cbfe4-ee1a-ec5f-4249-c25ab6142668@csgroup.eu> In-Reply-To: <6d6cbfe4-ee1a-ec5f-4249-c25ab6142668@csgroup.eu> From: Aaron Tomlin Date: Sun, 13 Feb 2022 13:32:07 +0000 Message-ID: Subject: Re: [PATCH v5 11/13] module: Move sysfs support into a separate file To: Christophe Leroy Cc: "mcgrof@kernel.org" , "cl@linux.com" , "pmladek@suse.com" , "mbenes@suse.cz" , "akpm@linux-foundation.org" , "jeyu@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-modules@vger.kernel.org" , "live-patching@vger.kernel.org" , "atomlin@atomlin.com" , "ghalat@redhat.com" , "allen.lkml@gmail.com" , "void@manifault.com" , "joe@perches.com" , "msuchanek@suse.de" , "oleksandr@natalenko.name" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2022-02-10 14:00 +0000, Christophe Leroy wrote: > Checkpatch: > > total: 0 errors, 2 warnings, 10 checks, 946 lines checked Ok. > > diff --git a/kernel/module/internal.h b/kernel/module/internal.h > > index b67ce836746a..52d30bf6d6b0 100644 > > --- a/kernel/module/internal.h > > +++ b/kernel/module/internal.h > > @@ -35,6 +35,9 @@ > > extern struct mutex module_mutex; > > extern struct list_head modules; > > > > +extern struct module_attribute *modinfo_attrs[]; > > +extern size_t modinfo_attrs_count; > > Can't this come in sysfs.c as well ? No. > > +#ifdef CONFIG_SYSFS > > +int mod_sysfs_setup(struct module *mod, const struct load_info *info, > > + struct kernel_param *kparam, unsigned int num_params); > > +void mod_sysfs_fini(struct module *mod); > > +void module_remove_modinfo_attrs(struct module *mod, int end); > > +void del_usage_links(struct module *mod); > > +void init_param_lock(struct module *mod); > > Why don't we move mod_sysfs_teardown() here as well ? Agreed. Kind regards, -- Aaron Tomlin