From patchwork Wed Jun 24 08:29:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 6666251 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 36BD3C05AC for ; Wed, 24 Jun 2015 08:30:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5EEC220623 for ; Wed, 24 Jun 2015 08:30:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81CFF2061D for ; Wed, 24 Jun 2015 08:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752005AbbFXIaB (ORCPT ); Wed, 24 Jun 2015 04:30:01 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:43412 "EHLO xavier.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751981AbbFXI3x (ORCPT ); Wed, 24 Jun 2015 04:29:53 -0400 Received: from ayla.of.borg ([84.193.93.87]) by xavier.telenet-ops.be with bizsmtp id k8Vr1q00L1t5w8s018Vrv8; Wed, 24 Jun 2015 10:29:52 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1Z7g47-00064M-7I; Wed, 24 Jun 2015 10:29:51 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1Z7g49-0004KN-JE; Wed, 24 Jun 2015 10:29:53 +0200 From: Geert Uytterhoeven To: Matthew Wilcox , Hannes Reinecke , "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/2] advansys: Do not byteswap sense_len on big endian Date: Wed, 24 Jun 2015 10:29:48 +0200 Message-Id: <1435134589-16601-1-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On big endian (e.g. m68k): drivers/scsi/advansys.c: In function ‘adv_build_req’: drivers/scsi/advansys.c:7806: warning: large integer implicitly truncated to unsigned type Indeed, adv_scsi_req_q.sense_len is uchar, not __le32, and must never be byteswapped. Fixes: 811ddc057aac7228 ("advansys: use DMA-API for mapping sense buffer") Signed-off-by: Geert Uytterhoeven --- drivers/scsi/advansys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 4305178e4e0147ba..1c1cd657c380c2e0 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -7803,7 +7803,7 @@ adv_build_req(struct asc_board *boardp, struct scsi_cmnd *scp, return ASC_BUSY; } scsiqp->sense_addr = cpu_to_le32(sense_addr); - scsiqp->sense_len = cpu_to_le32(SCSI_SENSE_BUFFERSIZE); + scsiqp->sense_len = SCSI_SENSE_BUFFERSIZE; /* Build ADV_SCSI_REQ_Q */