From patchwork Fri Apr 7 13:33:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9669523 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 DC34F60364 for ; Fri, 7 Apr 2017 13:35:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE39828604 for ; Fri, 7 Apr 2017 13:35:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C26A728607; Fri, 7 Apr 2017 13:35:35 +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 73ADD28604 for ; Fri, 7 Apr 2017 13:35:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756253AbdDGNfe (ORCPT ); Fri, 7 Apr 2017 09:35:34 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:36494 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756232AbdDGNf3 (ORCPT ); Fri, 7 Apr 2017 09:35:29 -0400 Received: by mail-wr0-f195.google.com with SMTP id o21so15031261wrb.3; Fri, 07 Apr 2017 06:35:29 -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; bh=XDol8I/d04sh4aXHEKwaj963Yw8LkKACQFjdWEaIYpA=; b=kvbwCLxf+w2vYm47/AluVVRjkEijUazE0s46fdEMkdFqkrERqWC2whigYEJxHngbuZ VpOz1zwwqjbYuuXJuOFRBbxZonfWMsPDkR+XkH16rQrZp3MehRaJRPnscpI5JtiSKN0F 4JqJYXYTUlKgzxOiF28YmV908h79vZru6kOGIZaxwkIOpK5JYYuCh1Zb58F4uCUtIGVk 5932CdBp03P572M4Zn50hCEUCMBs0EQ19eG4UkAC7Fsuw9xoRHFMgFY2IwSV5M6SudgR YKZDOMVlTAduYIhgveyptgP1c2UJhAfH2+svRv/n7f1sGZHyB8snthbQuAwBNjlsODPB rMwA== 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; bh=XDol8I/d04sh4aXHEKwaj963Yw8LkKACQFjdWEaIYpA=; b=OKvSVKVEIt/QniX9veQBbPdN6EszTCVUMQ/ZHiajt4Dv+w0yMyjhhGrZ7MXtN3hjXQ VHngESt+5dvaXSq6JkxUzHXJj7UQw/caHmPyD/+QP1lbiA7ucsW3mnHWhiCgNZvpDCk4 WCQedC8XU94Gcz+N2Lavx2kcnfFuwU7YFuWyq2HxCn6HQtAHPUcofRUiC7usTrXHI76H 81aW+NbJEmAeQU+zRKMS4FGKvpXQ/0ZhD+osNT6l3fdlrwSlAJIrH1dahEUkbaqPTsJ7 S1lNdjzSUDzXPPW2DeJdKcOBI1yAwVi1bF5eozA8rg6UsfK4xZ/VEfa7oVUCpaGD95i3 CDjw== X-Gm-Message-State: AFeK/H2ielO60dMluJCsU+RdOR15NUQ4pbm5O2caWaom5mYMo+CI/FQeVl8dwTqzCpl2Tg== X-Received: by 10.223.174.241 with SMTP id y104mr38415837wrc.79.1491572128169; Fri, 07 Apr 2017 06:35:28 -0700 (PDT) Received: from Red.local (LFbn-1-7035-57.w90-116.abo.wanadoo.fr. [90.116.208.57]) by smtp.googlemail.com with ESMTPSA id u47sm1301539wrb.27.2017.04.07.06.35.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Apr 2017 06:35:27 -0700 (PDT) From: Corentin Labbe To: don.brace@microsemi.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, esc.storagedev@microsemi.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH] scsi: smartpqi: remove writeq/readq function definitions Date: Fri, 7 Apr 2017 15:33:22 +0200 Message-Id: <20170407133322.30440-1-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.10.2 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 Instead of rewriting write/readq, use linux/io-64-nonatomic-lo-hi.h which already have them. Signed-off-by: Corentin Labbe --- drivers/scsi/smartpqi/smartpqi.h | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/drivers/scsi/smartpqi/smartpqi.h b/drivers/scsi/smartpqi/smartpqi.h index b673825..2850ece 100644 --- a/drivers/scsi/smartpqi/smartpqi.h +++ b/drivers/scsi/smartpqi/smartpqi.h @@ -19,6 +19,8 @@ #if !defined(_SMARTPQI_H) #define _SMARTPQI_H +#include + #pragma pack(1) #define PQI_DEVICE_SIGNATURE "PQI DREG" @@ -1102,33 +1104,4 @@ struct pqi_scsi_dev *pqi_find_device_by_sas_rphy( extern struct sas_function_template pqi_sas_transport_functions; -#if !defined(readq) -#define readq readq -static inline u64 readq(const volatile void __iomem *addr) -{ - u32 lower32; - u32 upper32; - - lower32 = readl(addr); - upper32 = readl(addr + 4); - - return ((u64)upper32 << 32) | lower32; -} -#endif - -#if !defined(writeq) -#define writeq writeq -static inline void writeq(u64 value, volatile void __iomem *addr) -{ - u32 lower32; - u32 upper32; - - lower32 = lower_32_bits(value); - upper32 = upper_32_bits(value); - - writel(lower32, addr); - writel(upper32, addr + 4); -} -#endif - #endif /* _SMARTPQI_H */