Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: zbestahu@gmail.com (Yue Hu)
Subject: [PATCH] staging: erofs: remove needless CONFIG_EROFS_FS_SECURITY
Date: Thu, 20 Jun 2019 17:56:47 +0800	[thread overview]
Message-ID: <20190620175647.000025ec.zbestahu@gmail.com> (raw)
In-Reply-To: <80310b8c-88fd-5350-71a4-9131b712731a@huawei.com>

On Thu, 20 Jun 2019 17:52:39 +0800
Chao Yu <yuchao0@huawei.com> wrote:

> On 2019/6/20 17:29, Yue Hu wrote:
> > On Thu, 20 Jun 2019 17:22:48 +0800
> > Chao Yu <yuchao0@huawei.com> wrote:
> >   
> >> On 2019/6/20 16:32, Gao Xiang wrote:  
> >>> Hi Yue,
> >>>
> >>> On 2019/6/20 16:30, Yue Hu wrote:    
> >>>> From: Yue Hu <huyue2 at yulong.com>
> >>>>
> >>>> erofs_xattr_security_handler is already marked __maybe_unused, no need
> >>>> to add CONFIG_EROFS_FS_SECURITY condition.    
> >>
> >> CONFIG_EROFS_FS_SECURITY is used as a control switch of erofs security labels
> >> feature, but __maybe_unused is to avoid unneeded compiler warning on unused
> >> variable, so I think we can't remove it.  
> > 
> > However, erofs_xattr_security_handler will not unused under CONFIG_EROFS_FS_SECURITY
> > condition, right?  
> 
> Yes, we will referred it in erofs_xattr_handlers anyway, so, maybe we can remove
> __maybe_unused instead?

It's good to me.

Thx.

> 
> Thanks,
> 
> > 
> > Thx.
> >   
> >>
> >> Thanks,
> >>  
> >>>>
> >>>> Signed-off-by: Yue Hu <huyue2 at yulong.com>
> >>>> ---
> >>>>  drivers/staging/erofs/xattr.c | 2 --
> >>>>  1 file changed, 2 deletions(-)
> >>>>
> >>>> diff --git a/drivers/staging/erofs/xattr.c b/drivers/staging/erofs/xattr.c
> >>>> index df40654..06024ac 100644
> >>>> --- a/drivers/staging/erofs/xattr.c
> >>>> +++ b/drivers/staging/erofs/xattr.c
> >>>> @@ -499,13 +499,11 @@ static int erofs_xattr_generic_get(const struct xattr_handler *handler,
> >>>>  	.get	= erofs_xattr_generic_get,
> >>>>  };
> >>>>  
> >>>> -#ifdef CONFIG_EROFS_FS_SECURITY
> >>>>  const struct xattr_handler __maybe_unused erofs_xattr_security_handler = {
> >>>>  	.prefix	= XATTR_SECURITY_PREFIX,
> >>>>  	.flags	= EROFS_XATTR_INDEX_SECURITY,
> >>>>  	.get	= erofs_xattr_generic_get,
> >>>>  };
> >>>> -#endif    
> >>>
> >>> Thanks for your patch.
> >>>
> >>> In that case...erofs_xattr_security_handler could be compiled into .rodata section?
> >>> I am not sure...
> >>>
> >>> Thanks,
> >>> Gao Xiang
> >>>     
> >>>>  
> >>>>  const struct xattr_handler *erofs_xattr_handlers[] = {
> >>>>  	&erofs_xattr_user_handler,
> >>>>    
> >>> .
> >>>     
> > 
> > .
> >   

  reply	other threads:[~2019-06-20  9:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20  8:30 [PATCH] staging: erofs: remove needless CONFIG_EROFS_FS_SECURITY Yue Hu
2019-06-20  8:32 ` Gao Xiang
2019-06-20  9:22   ` Chao Yu
2019-06-20  9:29     ` Yue Hu
2019-06-20  9:52       ` Chao Yu
2019-06-20  9:56         ` Yue Hu [this message]
2019-06-20  9:25   ` Yue Hu
2019-06-20  9:39     ` Gao Xiang
2019-06-21  7:01 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190620175647.000025ec.zbestahu@gmail.com \
    --to=zbestahu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox