Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938587AbcKQFmF (ORCPT ); Thu, 17 Nov 2016 00:42:05 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35893 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752999AbcKQFl7 (ORCPT ); Thu, 17 Nov 2016 00:41:59 -0500 From: Sergio Paracuellos To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, liodot@gmail.com, charrer@alacritech.com Subject: [PATCH v3 2/2] staging: slicoss: fix different address space warnings: 64 bits Date: Thu, 17 Nov 2016 06:42:28 +0100 Message-Id: <1479361348-7348-3-git-send-email-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1479361348-7348-1-git-send-email-sergio.paracuellos@gmail.com> References: <1479361348-7348-1-git-send-email-sergio.paracuellos@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1190 Lines: 39 This patch fix the following sparse warnings in slicoss driver: warning: incorrect type in assignment (different address spaces) This changes are for 64 bits. Signed-off-by: Sergio Paracuellos --- drivers/staging/slicoss/slic.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h index d637ab1..63637ba 100644 --- a/drivers/staging/slicoss/slic.h +++ b/drivers/staging/slicoss/slic.h @@ -540,6 +540,7 @@ static inline void slic_flush_write(struct adapter *adapter) ioread32(adapter->regs + SLIC_REG_HOSTID); } +#if BITS_PER_LONG == 32 static inline u64 slic_ioread64(void __iomem *mmio) { u64 low, high; @@ -548,6 +549,14 @@ static inline u64 slic_ioread64(void __iomem *mmio) high = ioread32(mmio + sizeof(u32)); return low | (high << 32); } +#elif BITS_PER_LONG == 64 +static inline u64 slic_ioread64(void __iomem *mmio) +{ + return readq(mmio); +} +#else +#error BITS_PER_LONG must be 32 or 64 +#endif #define UPDATE_STATS(largestat, newstat, oldstat) \ { \ -- 1.9.1