From patchwork Fri Jun 23 15:15:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 9806769 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E94E460329 for ; Fri, 23 Jun 2017 15:16:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D50712845C for ; Fri, 23 Jun 2017 15:16:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5E8A28552; Fri, 23 Jun 2017 15:16:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AFD22845C for ; Fri, 23 Jun 2017 15:16:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754298AbdFWPQE (ORCPT ); Fri, 23 Jun 2017 11:16:04 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:30408 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754019AbdFWPQE (ORCPT ); Fri, 23 Jun 2017 11:16:04 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v5NFFrxB017353 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Jun 2017 15:15:53 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v5NFFqRC016831 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Jun 2017 15:15:52 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v5NFFpou014482; Fri, 23 Jun 2017 15:15:51 GMT Received: from mwanda (/129.205.6.86) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 23 Jun 2017 08:15:51 -0700 Date: Fri, 23 Jun 2017 18:15:44 +0300 From: Dan Carpenter To: John Garry Cc: "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] scsi: hisi_sas: silence a static checker warning Message-ID: <20170623151544.57jlfbl5apofl6hj@mwanda> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP phy->phy_type is a u64. We only ever use the first two bits so it's a bit over kill perhaps. Anyway, let's declare the flags as ULL as well because that lets us do things like "phy->phy_type &= ~PORT_TYPE_SAS;". In the current code, static checkers complain that that would unintentionally clear the high 32 bits as well. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 4fc23087a939..b23245aeab74 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -56,8 +56,8 @@ struct hisi_hba; enum { - PORT_TYPE_SAS = (1U << 1), - PORT_TYPE_SATA = (1U << 0), + PORT_TYPE_SAS = (1ULL << 1), + PORT_TYPE_SATA = (1ULL << 0), }; enum dev_status {