Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp85614imm; Thu, 20 Sep 2018 15:41:45 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbf16ohQd2SZgB1Y6N4f+RaY5/BWlK3PV26tf1RR3ecPwYHlUpSmgOdCiNro61peuIYu3Yu X-Received: by 2002:a62:4dc1:: with SMTP id a184-v6mr43154342pfb.5.1537483305319; Thu, 20 Sep 2018 15:41:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537483305; cv=none; d=google.com; s=arc-20160816; b=IiDjCpWjwyC+YmjXwJErUnW/pMRl+Se0X5eFBPglhgendZLHqe784UG6vGiAqEPI76 jfstBaOCYeIVK/dpOtG5BLtSoBwOlUTNi6PNmhf319+bwkZuhXuYdtDQjRD++ExmCjeZ 1lao6d/kaxyscLgdcJ8fv51UFFklxRnUu12g0HpL3Zv+6WYU2IOabntNptITHQSBsL88 NbrcsHbmtykYP4K1n6fjNUHbm4fLDw/0ur6WAtQmBNwn/t9+DiMfZukqpfBCn3ce8K0w GJ12JW4zXL9LdthNUgSZzndPcpOO/RA0+ujAfDhBWXfvfpDtrlG5d/ajbMSiu52FUDbD K8hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:cc:from:references:to:subject:dkim-signature; bh=+mr7lOtk6rA3ohC2jYoNCBiIeKkLWX9kl6c7IbD0yUo=; b=rZxtfTSHpm0kPkB5oEq8Tdx4Wh/59rPth7Iau96/5r1hdLJUHUDCxXOkSi0avXjpaH 3bFw9+LIMi0Qa8QU0H1ho+S372Bd0RlgGjmsdmbqJZWUQODa16Of+kspDJQ7RqsQy5jF 7xKOWOVILURbOJ1AlpNMWkGrFkbFZUAeYofLldLQleMNAhB+5T/DG2/f9FpJiFDFtIJl d7LcJtOshFGzmdYRFl3GetiOGIg3r8Momb2ycpvE48MDst6D4AOSa0P98uPfNR5N3Faw 4JhfWEkLCKWmD/j4Cq8B39wvDCWHqO4H4GGGd8KnhXpJoMcE0z46+S/9vO8/lgAyECfO wo3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aol.com header.s=a2048 header.b=bpYX4ltB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d40-v6si25766331pla.217.2018.09.20.15.41.29; Thu, 20 Sep 2018 15:41:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@aol.com header.s=a2048 header.b=bpYX4ltB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726135AbeIUE1J (ORCPT + 99 others); Fri, 21 Sep 2018 00:27:09 -0400 Received: from sonic304-50.consmr.mail.gq1.yahoo.com ([98.137.68.232]:36451 "EHLO sonic304-50.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbeIUE1J (ORCPT ); Fri, 21 Sep 2018 00:27:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1537483282; bh=+mr7lOtk6rA3ohC2jYoNCBiIeKkLWX9kl6c7IbD0yUo=; h=Subject:To:References:From:Cc:Date:In-Reply-To:From:Subject; b=bpYX4ltBKJ0CF37ctPBTcmDvnLUKYiCnWXaV0Jy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J7nDstT4kk9YU4v8sJdDErN0m5CSIhpxxrPp5jEv7dN6ZPNaOR64iOy I.ZsD09KLiohmC949hi9xtMcIAj_XeOgcVnp05GDo6L7JWyMn_wM8QqL9eCfu5mNw4VqXLX7OFu. rqDPn_zH1zrpgCEy6rqfnyz.wsMRpgZlsuhORtn1MHsoNXOH_whkLizvzptlcH4Mgo9Hzfsy_Nc5 GQWU4bjyoH7AK8yksfNwpFGvvuW4lIyMejiHtSy09F2.Tw9slZGt4DXpw4TfN32Bd2FDwfm8QvkL L0YPC Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Thu, 20 Sep 2018 22:41:22 +0000 Received: from 218.108.98.82 (EHLO [192.168.250.210]) ([218.108.98.82]) by smtp419.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID cde33dac55d4efc9c74ca6ca2b738da5; Thu, 20 Sep 2018 22:37:22 +0000 (UTC) Subject: Re: [PATCH] staging: erofs: fix undeclared symbols To: =?UTF-8?Q?Thomas_Wei=c3=9fschuh?= References: <20180920185856.14322-1-linux@weissschuh.net> From: Gao Xiang Cc: Gao Xiang , Chao Yu , Greg Kroah-Hartman , linux-erofs@lists.ozlabs.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Message-ID: Date: Fri, 21 Sep 2018 06:37:11 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180920185856.14322-1-linux@weissschuh.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On 2018/9/21 2:58, Thomas Weißschuh wrote: > Move all internal symbols to the internal header file and add a missing > "static" declaration. > This fixes the sparse warnings like the following: > > drivers/staging/erofs/unzip_lz4.c:230:5: warning: symbol 'z_erofs_unzip_lz4' was not declared. Should it be static? > > Signed-off-by: Thomas Weißschuh > --- > drivers/staging/erofs/data.c | 5 ----- > drivers/staging/erofs/internal.h | 14 ++++++++++++++ > drivers/staging/erofs/super.c | 5 ----- > drivers/staging/erofs/unzip_vle.c | 2 +- > drivers/staging/erofs/unzip_vle_lz4.c | 2 -- > drivers/staging/erofs/utils.c | 2 -- > 6 files changed, 15 insertions(+), 15 deletions(-) > > diff --git a/drivers/staging/erofs/data.c b/drivers/staging/erofs/data.c > index ac263a180253..9bfcc549bbf0 100644 > --- a/drivers/staging/erofs/data.c > +++ b/drivers/staging/erofs/data.c > @@ -137,11 +137,6 @@ static int erofs_map_blocks_flatmode(struct inode *inode, > return 0; > } > > -#ifdef CONFIG_EROFS_FS_ZIP > -extern int z_erofs_map_blocks_iter(struct inode *, > - struct erofs_map_blocks *, struct page **, int); > -#endif > - > int erofs_map_blocks_iter(struct inode *inode, > struct erofs_map_blocks *map, > struct page **mpage_ret, int flags) > diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h > index 367b39fe46e5..d4c4c87bcd35 100644 > --- a/drivers/staging/erofs/internal.h > +++ b/drivers/staging/erofs/internal.h > @@ -547,6 +547,20 @@ extern unsigned long erofs_shrink_count(struct shrinker *shrink, > struct shrink_control *sc); > extern unsigned long erofs_shrink_scan(struct shrinker *shrink, > struct shrink_control *sc); > +extern void erofs_workgroup_free_rcu(struct erofs_workgroup *grp); > + > +#ifdef CONFIG_EROFS_FS_ZIP > +/* super.c */ > +extern int z_erofs_init_zip_subsystem(void); > +extern void z_erofs_exit_zip_subsystem(void); > + > +/* unzip_vle.c */ > +extern int z_erofs_map_blocks_iter(struct inode *, > + struct erofs_map_blocks *, struct page **, int); > + > +/* unzip_lz4.c */ > +extern int z_erofs_unzip_lz4(void *in, void *out, size_t inlen, size_t outlen); Thanks for your patch. Here z_erofs_unzip_lz4 couldn't be directly declared in internal.h --- internal.h means the file system internal but not for the decompression algorithms. Some declarations in *.c are for temporary use. z_erofs_unzip_lz4 has no related with the file system itself and I planned to cleanup later after we have more decompression algorithm support such as zstd.... If you want to cleanup now, prefer to introduce "decompressor wrappers" and a new .h rather than cleanup as simple as what is done in this commit. > +#endif > > #ifndef lru_to_page > #define lru_to_page(head) (list_entry((head)->prev, struct page, lru)) > diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c > index 2df9768edac9..c41d92e0cb3c 100644 > --- a/drivers/staging/erofs/super.c > +++ b/drivers/staging/erofs/super.c > @@ -521,11 +521,6 @@ static struct file_system_type erofs_fs_type = { > }; > MODULE_ALIAS_FS("erofs"); > > -#ifdef CONFIG_EROFS_FS_ZIP > -extern int z_erofs_init_zip_subsystem(void); > -extern void z_erofs_exit_zip_subsystem(void); > -#endif > - > static int __init erofs_module_init(void) > { > int err; > diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c > index 8721f0a41d15..a0d6c620051f 100644 > --- a/drivers/staging/erofs/unzip_vle.c > +++ b/drivers/staging/erofs/unzip_vle.c > @@ -517,7 +517,7 @@ static void __z_erofs_vle_work_release(struct z_erofs_vle_workgroup *grp, > erofs_workgroup_put(&grp->obj); > } > > -void z_erofs_vle_work_release(struct z_erofs_vle_work *work) > +static void z_erofs_vle_work_release(struct z_erofs_vle_work *work) > { > struct z_erofs_vle_workgroup *grp = > z_erofs_vle_work_workgroup(work, true); How about making a separate patch to fix all the missing `static's? Or How about changing your patch title "staging: erofs: fix undeclared symbols" to indicate you also add some missing `static's ? Thanks, Gao Xiang > diff --git a/drivers/staging/erofs/unzip_vle_lz4.c b/drivers/staging/erofs/unzip_vle_lz4.c > index f5b665f15be5..e30e6e2ef05b 100644 > --- a/drivers/staging/erofs/unzip_vle_lz4.c > +++ b/drivers/staging/erofs/unzip_vle_lz4.c > @@ -99,8 +99,6 @@ int z_erofs_vle_plain_copy(struct page **compressed_pages, > return 0; > } > > -extern int z_erofs_unzip_lz4(void *in, void *out, size_t inlen, size_t outlen); > - > int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages, > unsigned clusterpages, > struct page **pages, > diff --git a/drivers/staging/erofs/utils.c b/drivers/staging/erofs/utils.c > index 595cf90af9bb..26b9f97f258a 100644 > --- a/drivers/staging/erofs/utils.c > +++ b/drivers/staging/erofs/utils.c > @@ -99,8 +99,6 @@ int erofs_register_workgroup(struct super_block *sb, > return err; > } > > -extern void erofs_workgroup_free_rcu(struct erofs_workgroup *grp); > - > int erofs_workgroup_put(struct erofs_workgroup *grp) > { > int count = atomic_dec_return(&grp->refcount); >