Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4717781ybf; Wed, 4 Mar 2020 09:16:59 -0800 (PST) X-Google-Smtp-Source: ADFU+vsULgFodL23i3IAEP0VOeVP9o/G6Dz+Jz8tL3cH0WPFKWHfAwv64nzuprnGMOdEs+ljM9/x X-Received: by 2002:a9d:6c1:: with SMTP id 59mr3405078otx.281.1583342218925; Wed, 04 Mar 2020 09:16:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583342218; cv=none; d=google.com; s=arc-20160816; b=Fli53OMMvNNzMXBicbYM7l5VkiiVFRgCX0wy1qXtr8jtwcV38x5m/9cQRPSlOdHqpi WcGfopG7Kic4N9xZJ1cIwPLV3cdgRv1GIm3num1vgqdmsYy8r85xQVDXZ8ud6ZCpnTgI kkTd/X2S1INzZ43ITWE/WQGwGB8xWcjLDKOJnR98EsSaxVcSSgfzby2n+6M1Npuvoou+ SzApH7VdtA1t9mA+hwlWmF9B+Bq0SCO7yDbsx8pqe+PyuYTEn88tAPhZIdqLLuhsATOB W/yDsABxuGGWh0S4l3aXojpcS1b23vB3AxNVVXtNY/GO1iGNICKga+cROPColP0Dd9pz JG2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=W/o003p8WXvnjiWGobVFEZFkKelwiiKhzUSVE4Qihp8=; b=YsaCk5hneGE+DUlrlvSqxFCzMOyddvt1OOMjEWjbiXrNUEtVSKZ8XmaSsxa6E5l01Z d1FNZ7O2lzpnGjX67QHvX0F708EuV8179KKy99HkUJqk/G+Bwfdy9M0aYU9z00Td0UY/ O9yy8fXP71OyzHKkJ0v3BtxwLj48vCUJxQUAowWKXB8kuKNUMBthQdmdw+v0mBTqI6hL D9/C4M1/fjKZGv9YUVZWndX6MMi5q9M1pLAyyaqMlfbDvGrhlh49L202X/UZnMlUAsNb l9XdqhJ2TxQt3jQmK+Pd6JmlrqG83E7YwC9g6f8EpcvFq0OZI6TqHNNk1T8SePKF1+tS 1AzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YZD6jmP1; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o20si1482011otl.60.2020.03.04.09.16.46; Wed, 04 Mar 2020 09:16:58 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=YZD6jmP1; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727804AbgCDRQi (ORCPT + 99 others); Wed, 4 Mar 2020 12:16:38 -0500 Received: from mail-yw1-f67.google.com ([209.85.161.67]:34091 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbgCDRQi (ORCPT ); Wed, 4 Mar 2020 12:16:38 -0500 Received: by mail-yw1-f67.google.com with SMTP id o186so2737424ywc.1; Wed, 04 Mar 2020 09:16:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=W/o003p8WXvnjiWGobVFEZFkKelwiiKhzUSVE4Qihp8=; b=YZD6jmP1mcXevlhVHAZGcZeMk47KHCDFNnzSmV0HKAPXBxo95ooTwwHUbUqtdNMn84 uUN3AdohPaqDZ50XTvQG1xwH33nbFl41OIhukRBvb2vtj/g7taNuuJJ06n4IPVOjVPSA ivwPiji783YHt43uzNxHGQcK63tB+yH0r+RTWnSFRLgD3+WQUqQ04t4Zkp+9pwGiF0Uo Cz0ZOQey2vGJKm/Ps0MyJI62QXSVtmrsXRAVtxj25DqWxP/aBBL3xYa5B0wVyrZZmfHX U1HZYgh3pV6rhj5wbILN81H+UOdHLRwWMDaqxBWbaGzOAANy8j7DelhuC9XKAqw531JV nLYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W/o003p8WXvnjiWGobVFEZFkKelwiiKhzUSVE4Qihp8=; b=lqXI9kcrHrix+Yi6K38qG7kq62PbqJIDmQXWStcjOlqBjmJ4bAmQagQ47THO9JyyE8 ql9Ofo9nB6Nf/k/9q73GRzCVRZCYtlx5VvGLz5gUWY1ZhyteoBfRGqmnHibuu9Crf8bC 7FXyEAo3dQbRinFRdYRhwejhCwfq7Zdfozn8vhnHdjkoOB0EUYWAutUYkKvuRp6hiKtO 8PCB8ub6nu1Nfqej0ziBk7ICEunZyCC5qfBWyMY1oMWD8ZptmSvU6TS0HVw+oTiIypWL J+WvXBd3hjBfk9zFQjn/mPgAw8wNclYrvnWQb6+d78wInrHB0Z2ptndpRN51cGC0nJY7 PS0Q== X-Gm-Message-State: ANhLgQ0cPV2YBzs2kRlNiE7NbL44Ie5agSMoJ5ny+WfQGVjRkimlqjPQ 90G72wBNiJu2M6tcoODOx84jgcaS3y9ncyrdBlmOf38V X-Received: by 2002:a81:f10a:: with SMTP id h10mr3734463ywm.109.1583342196085; Wed, 04 Mar 2020 09:16:36 -0800 (PST) MIME-Version: 1.0 References: <1583307771-16365-1-git-send-email-hqjagain@gmail.com> In-Reply-To: <1583307771-16365-1-git-send-email-hqjagain@gmail.com> From: Steve French Date: Wed, 4 Mar 2020 11:16:25 -0600 Message-ID: Subject: Re: [PATCH] fs/cifs: fix gcc warning in sid_to_id To: Qiujun Huang Cc: Steve French , CIFS , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org merged into cifs-2.6.git for-next On Wed, Mar 4, 2020 at 1:42 AM Qiujun Huang wrote: > > fix warning [-Wunused-but-set-variable] at variable 'rc', > keeping the code readable. > > Signed-off-by: Qiujun Huang > --- > fs/cifs/cifsacl.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c > index 716574a..ae42163 100644 > --- a/fs/cifs/cifsacl.c > +++ b/fs/cifs/cifsacl.c > @@ -342,7 +342,7 @@ > sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid, > struct cifs_fattr *fattr, uint sidtype) > { > - int rc; > + int rc = 0; > struct key *sidkey; > char *sidstr; > const struct cred *saved_cred; > @@ -450,11 +450,12 @@ > * fails then we just fall back to using the mnt_uid/mnt_gid. > */ > got_valid_id: > + rc = 0; > if (sidtype == SIDOWNER) > fattr->cf_uid = fuid; > else > fattr->cf_gid = fgid; > - return 0; > + return rc; > } > > int > -- > 1.8.3.1 > -- Thanks, Steve