From patchwork Sat Aug 5 00:47:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 9882815 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 73AFC60375 for ; Sat, 5 Aug 2017 00:48:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6765A28A14 for ; Sat, 5 Aug 2017 00:48:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C80F28A1D; Sat, 5 Aug 2017 00:48:18 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 02FDC28A18 for ; Sat, 5 Aug 2017 00:48:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752724AbdHEAsR (ORCPT ); Fri, 4 Aug 2017 20:48:17 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33955 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752697AbdHEAsP (ORCPT ); Fri, 4 Aug 2017 20:48:15 -0400 Received: by mail-pf0-f193.google.com with SMTP id t86so3208172pfe.1 for ; Fri, 04 Aug 2017 17:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3kXoDY+rR5K5UIW4Y9bpa/prDBV2EYtGuAakTQCpBxs=; b=EkwVqTKAh7X3C3akJYGmdHYlnsU2OqxgYnuf/10D6E/YcIOwJMinHCS6wdlRi2+xah Tc8F4JevdUZDsr9OrtaBa7DV1a9GonQaMl6qgExVaj2Ior/xYWSFYf8+nVdY5Gsgylh7 ipCIoJxzo+aMRDnXlxwNFeaO0Th0c7cpBI8MvOzqLyrqfSKcwkjSN++Tr0FFC7y21vrf hypM8pbKGpvto0E4/HAQoEoRDMpHM8NaQTU+XcaHnqbPemYb7L1ndrxp9YTck35MrZkX Shgd6v3hba/1XYrGciFEz7inPj7WrXdgT/g6RlK/UmyfiiK9hf90Ar3TDT4hM1Mp8Gyz vYUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3kXoDY+rR5K5UIW4Y9bpa/prDBV2EYtGuAakTQCpBxs=; b=tPRVlWi6UrtmvFTt3N9stZaJIFWD0UXRrCNvKMA9ZynfbUDEEkK85fxjGCzwhG4Azy qoo8hT3Dg6X2rQX9A1qWWX6e7IcHWGnYrt+9ZRiaI+KsOU6LjRqMgBDjz2uJkFInWXwy Ng1n4+H6tI1F3mt8eyrPkrgUI30eV+2zn/hi3DsZZxMRcjg9yf5IUmO8ShmMrIhFkhcJ OikmBsXsir3PMg9dFuhXwQf9lfkcVrfcc/MJhAN89uKWZqheyWklYww/qdnrSR4wiz61 bPqZm/T5n5fHB6gyNrdfPO/O2QCm7E+wm+omcH2Fb4yuYgqPUChDwJ6uEB8X11zN0+Am dEJg== X-Gm-Message-State: AIVw111GhQ4+JFYZfQaO94HORQF+Deu78iPARpBFznrzTR0/EhgruejJ 8GnJQS3k57m0UK+P X-Received: by 10.98.163.68 with SMTP id s65mr4347398pfe.217.1501894094241; Fri, 04 Aug 2017 17:48:14 -0700 (PDT) Received: from linux-8upr.localdomain (ip68-4-115-207.oc.oc.cox.net. [68.4.115.207]) by smtp.gmail.com with ESMTPSA id 69sm2725708pfh.186.2017.08.04.17.48.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Aug 2017 17:48:13 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, Maurizio Lombardi , James Smart Subject: [PATCH v2 19/20] scsi: lpfc: fix "integer constant too large" error on 32bit archs Date: Fri, 4 Aug 2017 17:47:30 -0700 Message-Id: <20170805004731.1335-20-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170805004731.1335-1-jsmart2021@gmail.com> References: <20170805004731.1335-1-jsmart2021@gmail.com> 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 From: Maurizio Lombardi cc1: warnings being treated as errors drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_get_wwpn': drivers/scsi/lpfc/lpfc_init.c:3253: error: integer constant is too large for 'long' type Signed-off-by: Maurizio Lombardi Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- v2: use rol64() --- drivers/scsi/lpfc/lpfc_init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 19af7e2c2ac0..8c512e494353 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -3733,9 +3734,7 @@ lpfc_get_wwpn(struct lpfc_hba *phba) if (phba->sli_rev == LPFC_SLI_REV4) return be64_to_cpu(wwn); else - return (((wwn & 0xffffffff00000000) >> 32) | - ((wwn & 0x00000000ffffffff) << 32)); - + return rol64(wwn, 32); } /**