Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp996043pxu; Sat, 5 Dec 2020 00:16:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHNv+yHdiiiEszSQW4JqqSnA5JivgQmhoStn4o41KPVjOyZ/jvus2HPiJZr8HCsgmWOE/H X-Received: by 2002:a17:906:7f0b:: with SMTP id d11mr10857747ejr.7.1607156184111; Sat, 05 Dec 2020 00:16:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1607156184; cv=pass; d=google.com; s=arc-20160816; b=hnaWstIZ4oOuxxTUXS+Z23s9vxTQ8dLKjirz/xTzSKmuN2NK+yR5qozmKRo+NSzfjX iYCIkQzYdmrCVL0oW1UdvFe5h+1cJULjFLGVJ6GmziOthp9XswyMIS0Kf3VnbjF6zOe+ T5noC0j6oiQl5fYDSUK2yjQzsgL1k9Uli+a0PMU+YWEfjKB6QZMzSkf9PX9jUKtjZSho 4PWr3kZRcw3xM3Bx8vqLc7wqTbQgEDETT/XWiyhdeH6XZHcmS6sfXQydrV5jciHh0XyM 8UxvqxlpmRbFInlc+qK/PN2nbXtvqi51XTc23jpHLcfdDNwGJbF4SPQ1YTdVqdCZ8LOk OBGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :wdcipoutbound:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature:ironport-sdr:dkim-signature; bh=QaD8ZXAnKZIbm34csWyxO0eghQirkjHU3q8r7YKqEDY=; b=vyNLUVVK6KS2qHJuydjLCjzK/PonnjTAnMYVAjsCh6pnP/CMtGH+i+FcX1eOPmd1Wo U9QUBIm7M4+Cdklg47461vW4QNIbyJ9SE9o/Fap02SBHlysOX6ekN/y6Qk3d0rJx/ED1 t4hqPSnKlVsPCF7XkEobaSyjIyyl6gFbHPYX9VbfRRz0+51A80qYw82MrELiZwK7wNPh qsO6DPKreHBa/muopw1bFi0kEQLd4WME7MU3Tawe0KUkiTf7lQQW63blMWeKdxgmw8IK YkwjHEv+SxfWMSOmaaMJo3Sun+pw7dr0s9Fz+LSvroAdBSPqwJFIdmiDkMBBlix4ognX F0Iw== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b="O/N4RHrm"; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=KjxjUMTC; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ly10si2794178ejb.84.2020.12.05.00.15.59; Sat, 05 Dec 2020 00:16:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b="O/N4RHrm"; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=KjxjUMTC; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727726AbgLEINH (ORCPT + 99 others); Sat, 5 Dec 2020 03:13:07 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:64597 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727430AbgLEIKu (ORCPT ); Sat, 5 Dec 2020 03:10:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1607155864; x=1638691864; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=gFc5oZYvAh5wSQP41kBNzBxu3qs7lFBf7h+5BDapJ2M=; b=O/N4RHrmZtWPzZzvpaQXb/zURcp8GvEie7BvaffhcmF2FXq/R6rJySkR rPmkyxbzGjaAsq77QfqeFEfrqMRCFw1vlJDnx65ruJ7kl3gjD2a/J/mnY pM3186snTvo5UVh4C9Yxj647hddKPAKEXtekWIUESEnPR/Sqs32KP7alK y760GwoeZEW3sgpDhSTRTPM36PdQdoW1xk6RjuX4qBLKRhV3+k6TiVPFB 1nFNhYmnGDfuYfKpYk5wtyQMh4Vjkmp6APWB3AoNtjYRZS2+dMwrhgW3A TtM25OzaQqyFR934wfY3qnWdb2LC8SVT6vPCDvxCxaYQ64MKKLhqRzFxj Q==; IronPort-SDR: NUBWgbapeL//OCn8j8dprVOGULLz+HidbmynKnCfizs2YIAUtEzbggw+B2o84JGqWTNGJTX0L6 q/kx3mbh2GAcNfcsW+gnXfrGJxtJEIr3T8kRZqRk0E1kUISCCdrROBUw1DuPSSly1XnSd0rNUj vcFYrCxSAncmPdbmB2eX4yJAwrGEcU85bquKZWp0GBVR3Rl4c1o8wPbq1LsbTsCaO5AypoIobO t46npxkPNdy8xVMXCrzvCX+Tf/zWw3OmMTpMW83EqRRZ9hfakBDzF1XLgSD4BZAfG7ffOAQkm6 /b0= X-IronPort-AV: E=Sophos;i="5.78,395,1599494400"; d="scan'208";a="154549203" Received: from mail-dm6nam10lp2108.outbound.protection.outlook.com (HELO NAM10-DM6-obe.outbound.protection.outlook.com) ([104.47.58.108]) by ob1.hgst.iphmx.com with ESMTP; 05 Dec 2020 16:08:51 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mskxbhQzUlMJRBd5k87AE5hnhiP+EM+8clQic35GguBM+7iMQmrl/be+9Hzd0At/i+2BG+kycXO7QPyzXQVm7C1byFF0T67bH1k4YTZaoK3SswqoZ3nyiVZXAOmcCSRPB9+1wtBDdA2B+sUyK3cFGzUNpEo6nI7J7GyCIE5sCnQBZdCoxt2SNyWg9KpiGIp0kaS0Hgmtzeq0YMOpNL9NS3uPGkFOaUoQHG00LyU5IDB3saHP6ztU3wbgCjCY1LRlXvuNNjxuwijOF/b6Mn4LLSS6ZLgmWHjijCpPvU6VPnpzxKXwGTKyub3otsrgLqtb6iV1INOCua0irwK0A2+FXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QaD8ZXAnKZIbm34csWyxO0eghQirkjHU3q8r7YKqEDY=; b=oXisNjPQevRe2tJ5NkF/w/KzFMZbUxqQZMpjnl8NZGLoo6aebt8dEks22V3H0SPTJUfxwqfS+uuX1SIYGrR+2CUVWEQsOAADMXW9BjMsw3GXafHy+zic+/rhed851emUQKKEAHKl1kI2CtNRX9uHZixkCWsoVBpr+0au/cWZ4tD/sJOuRMa/BO8h4zYLkAyUrEWOgcXLnqJH2G9Jfn8jPTpwNV0c4HmBPe4jJ+l6YqS7W3b6F2yneaeQxuKwxLh1GDNV3Eq9t/zi9h3yA0i7G/lGRxg8Xiqzme5dPYEma/VY8Va1IjVlkJkp4xhvlL14ZBb5uBe6G1DYlDPU+yVoIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QaD8ZXAnKZIbm34csWyxO0eghQirkjHU3q8r7YKqEDY=; b=KjxjUMTCWfSwyNw/O1nU04IlZ854rtukilTmjr1v+Dn4FT/GNpWltWmF+PfGW97EM/NYX5WAFNYUaXO9NZSlTDPJmMVP0uDxejR8wCAHU5vASQTtBtsrGLeQAoJoui0JYhgGgleoWJZ9XIBuEfKgmvHLiIJgApl1rordxVN7VMM= Received: from DM6PR04MB6575.namprd04.prod.outlook.com (2603:10b6:5:1b7::7) by DM6PR04MB6667.namprd04.prod.outlook.com (2603:10b6:5:247::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.18; Sat, 5 Dec 2020 08:08:49 +0000 Received: from DM6PR04MB6575.namprd04.prod.outlook.com ([fe80::a564:c676:b866:34f6]) by DM6PR04MB6575.namprd04.prod.outlook.com ([fe80::a564:c676:b866:34f6%8]) with mapi id 15.20.3632.021; Sat, 5 Dec 2020 08:08:49 +0000 From: Avri Altman To: Arnd Bergmann , "James E.J. Bottomley" , "Martin K. Petersen" , Nathan Chancellor , Nick Desaulniers , Jaegeuk Kim CC: Arnd Bergmann , Alim Akhtar , Stanley Chu , Can Guo , Asutosh Das , Bean Huo , Bart Van Assche , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "clang-built-linux@googlegroups.com" Subject: RE: [PATCH] ufshcd: fix Wsometimes-uninitialized warning Thread-Topic: [PATCH] ufshcd: fix Wsometimes-uninitialized warning Thread-Index: AQHWycQXp6g3K07ih063gLNOLCVad6noJ+8Q Date: Sat, 5 Dec 2020 08:08:49 +0000 Message-ID: References: <20201203223137.1205933-1-arnd@kernel.org> In-Reply-To: <20201203223137.1205933-1-arnd@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=wdc.com; x-originating-ip: [77.138.4.172] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: e959d3fd-9539-42a1-dbd9-08d898f4ff1e x-ms-traffictypediagnostic: DM6PR04MB6667: x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:4941; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: b3II3lU9ufbOkfaKzdDUVYaNWFQDsHPpHIJqrdoBLJnXaffc5qNyhDsP4BZ9Rf6JSGH0lUjZj7W6S12xBk0d0AxGVSiP2n9pUqz6NLfwRzE7XzA/C8YnvIRKsuT8DYHpfCq+xb92rnw6XcolB98ALxpbGVS4IZ+wu3EPosIRb3zCeSa4ULQsHtSOPBJ8y+8IOxAck59o+wYgFSKtoWQ4cDpai1EDbnffhepkaAiqNYvRvSBpyOMudvMF6f3v7cukvGjwum1PsyTv+Od0ZJpCijsK3AbnDMAiBXEASz5yEDG+byisiKt3iLhOTxRiMHd4RE3DvFA10Ogrb0Xln/DOeg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR04MB6575.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(136003)(39860400002)(346002)(376002)(396003)(186003)(54906003)(4326008)(26005)(52536014)(9686003)(8676002)(33656002)(83380400001)(7416002)(110136005)(64756008)(66946007)(55016002)(66556008)(5660300002)(478600001)(66476007)(316002)(66446008)(8936002)(7696005)(2906002)(86362001)(6506007)(76116006)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Bv2rbE/mLZaZWJdJQjSVGwyD0/buw7MB8nlUFWRsF9ivMen4jUR3UrXhA4xX?= =?us-ascii?Q?PP0l2IfuZZnLNIh+WvTg+Rf5PiyaqPVPGMSg01oRA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vcQzFBIZcNghjD+G3A=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6575.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e959d3fd-9539-42a1-dbd9-08d898f4ff1e X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Dec 2020 08:08:49.1723 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JYTn67zuHL/OlHEOgMMm/YOt8cVv3b/zQuqZlKDpGNhBtiPCYumZImoWPqyGr6btpUTPakjDcGspDYThHDo79A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB6667 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >=20 >=20 > From: Arnd Bergmann >=20 > clang complains about a possible code path in which a variable is > used without an initialization: >=20 > drivers/scsi/ufs/ufshcd.c:7690:3: error: variable 'sdp' is used uninitial= ized > whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] > BUG_ON(1); > ^~~~~~~~~ > include/asm-generic/bug.h:63:36: note: expanded from macro 'BUG_ON' > #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (= 0) > ^~~~~~~~~~~~~~~~~~~ >=20 > Turn the BUG_ON(1) into an unconditional BUG() that makes it clear > to clang that this code path is never hit. >=20 > Fixes: 4f3e900b6282 ("scsi: ufs: Clear UAC for FFU and RPMB LUNs") > Signed-off-by: Arnd Bergmann Reviewed-by: Avri Altman > --- > drivers/scsi/ufs/ufshcd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index f165baee937f..b4f7c4263334 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -7687,7 +7687,7 @@ static int ufshcd_clear_ua_wlun(struct ufs_hba > *hba, u8 wlun) > else if (wlun =3D=3D UFS_UPIU_RPMB_WLUN) > sdp =3D hba->sdev_rpmb; > else > - BUG_ON(1); > + BUG(); > if (sdp) { > ret =3D scsi_device_get(sdp); > if (!ret && !scsi_device_online(sdp)) { > -- > 2.27.0