linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/cifs:simplify the return expression of cifs_swn_auth_info_krb
@ 2021-02-24  3:32 dingsenjie
  2021-02-24  7:02 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: dingsenjie @ 2021-02-24  3:32 UTC (permalink / raw)
  To: sfrench, samba-technical; +Cc: linux-cifs, linux-kernel, dingsenjie

From: dingsenjie <dingsenjie@yulong.com>

simplify the return expression.

Signed-off-by: dingsenjie <dingsenjie@yulong.com>
---
 fs/cifs/cifs_swn.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/fs/cifs/cifs_swn.c b/fs/cifs/cifs_swn.c
index d35f599..378531b 100644
--- a/fs/cifs/cifs_swn.c
+++ b/fs/cifs/cifs_swn.c
@@ -34,13 +34,7 @@ struct cifs_swn_reg {
 
 static int cifs_swn_auth_info_krb(struct cifs_tcon *tcon, struct sk_buff *skb)
 {
-	int ret;
-
-	ret = nla_put_flag(skb, CIFS_GENL_ATTR_SWN_KRB_AUTH);
-	if (ret < 0)
-		return ret;
-
-	return 0;
+	return = nla_put_flag(skb, CIFS_GENL_ATTR_SWN_KRB_AUTH);
 }
 
 static int cifs_swn_auth_info_ntlm(struct cifs_tcon *tcon, struct sk_buff *skb)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs/cifs:simplify the return expression of cifs_swn_auth_info_krb
  2021-02-24  3:32 [PATCH] fs/cifs:simplify the return expression of cifs_swn_auth_info_krb dingsenjie
@ 2021-02-24  7:02 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-02-24  7:02 UTC (permalink / raw)
  To: dingsenjie, sfrench, samba-technical
  Cc: kbuild-all, linux-cifs, linux-kernel, dingsenjie

[-- Attachment #1: Type: text/plain, Size: 2182 bytes --]

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cifs/for-next]
[also build test ERROR on v5.11 next-20210223]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/dingsenjie-163-com/fs-cifs-simplify-the-return-expression-of-cifs_swn_auth_info_krb/20210224-122502
base:   git://git.samba.org/sfrench/cifs-2.6.git for-next
config: s390-randconfig-r022-20210223 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/2b5765f734346617361817a3b6cefea209078b3f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review dingsenjie-163-com/fs-cifs-simplify-the-return-expression-of-cifs_swn_auth_info_krb/20210224-122502
        git checkout 2b5765f734346617361817a3b6cefea209078b3f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   fs/cifs/cifs_swn.c: In function 'cifs_swn_auth_info_krb':
>> fs/cifs/cifs_swn.c:37:9: error: expected expression before '=' token
      37 |  return = nla_put_flag(skb, CIFS_GENL_ATTR_SWN_KRB_AUTH);
         |         ^
   fs/cifs/cifs_swn.c:38:1: error: control reaches end of non-void function [-Werror=return-type]
      38 | }
         | ^
   cc1: some warnings being treated as errors


vim +37 fs/cifs/cifs_swn.c

    34	
    35	static int cifs_swn_auth_info_krb(struct cifs_tcon *tcon, struct sk_buff *skb)
    36	{
  > 37		return = nla_put_flag(skb, CIFS_GENL_ATTR_SWN_KRB_AUTH);
    38	}
    39	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32186 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-24  7:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24  3:32 [PATCH] fs/cifs:simplify the return expression of cifs_swn_auth_info_krb dingsenjie
2021-02-24  7:02 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).