Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4417880pxb; Mon, 21 Feb 2022 20:59:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzr3pIFWwmenJQZH6xCJMCHDZPVfmvWbFzOtIDcghViIz+9KpuNPAg4TKF9/22RPqYdehXO X-Received: by 2002:a05:6a02:106:b0:36c:96dd:8c17 with SMTP id bg6-20020a056a02010600b0036c96dd8c17mr18552815pgb.190.1645505975528; Mon, 21 Feb 2022 20:59:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645505975; cv=none; d=google.com; s=arc-20160816; b=V0F+QRIXIm2cnf7xvWxxVT0ctuqCe91mafRxPrGF86Zg0McSA0bo+j7etGc2jEUYne Znp62lFCxGZJXgzl4hI0EklpiujQki2BkX4UHJZoikTD5uUNmGAOs5WpIhmETEjvnobe P7RerBK9IQTItZ7o50aJHlxcnhg7g9NG0wzQFYqUyObcTo+V10fjyGAnMFrnKpRuk/CD Av6Jd5uH8iGNj+LUmUUYg4jOZG/7I8u94t3SELyBQYRsLjfoIL+AqDRld1FuyFZ1cgIi SXeQkjbFZT498D5iIsNZ23CbiCzBxJ9mycCDCl8bPxvTQhkN5zKq4+RJjXkvd3800pkb TWGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:subject:from:message-id:cc:to :dkim-signature; bh=dGwM6zCAZezD9UAOkbQM1FyRcimaQ2GZliBAK4GzXRc=; b=fti1QxXUXPM8QpKIuC5DiD3ROuwTBUtJH3BNCB7NJeRIgefeDF47vfof4Q5JnNQceu evoyTuStGwtKABDQnOm/tbKYQ8IJmS4Kf1iDzZJlxpONXXaC3Fm3bs8gMxo24aAa7Ai8 zaV2EQnZx+Q8RAOXUM9W0GP8TCBJaibyKu14uO3angyVSC2Op58vOWCTXSXMCHXZ4U/b es5ajkWAiyojT2YjORqdjpfVGYSUd9QEHweIzLw9k0WzSULmh17yk23StvBXze1PD+av OtDWOrChjQwbXiz1FzoHZDGY59GLV4pt2lYUdvPsiD8qWLmEDu5dunAK66tnYrzaonGC hD7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=K624Q5Lt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id mw17-20020a17090b4d1100b001b9bc2a9105si1166184pjb.82.2022.02.21.20.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 20:59:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=K624Q5Lt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E0A088A33E; Mon, 21 Feb 2022 20:36:33 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237097AbiBUXlU (ORCPT + 99 others); Mon, 21 Feb 2022 18:41:20 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232179AbiBUXlT (ORCPT ); Mon, 21 Feb 2022 18:41:19 -0500 Received: from wnew4-smtp.messagingengine.com (wnew4-smtp.messagingengine.com [64.147.123.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5E5D245A8; Mon, 21 Feb 2022 15:40:54 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id B42D22B00234; Mon, 21 Feb 2022 18:23:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 21 Feb 2022 18:23:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:date:date:from:from:in-reply-to :message-id:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=dGwM6z CAZezD9UAOkbQM1FyRcimaQ2GZliBAK4GzXRc=; b=K624Q5LtzhKisanNhHxmUl 4AlQx8iTOn46MbDafdQfuJRNz/chZrzm7JugXOq+bef3SR77slDYEW5jlKoWss3a mqoDdVU5o/+UEmScKwnKI5LE1h0PqH49BNz+Dg2RwlgUroKHRtVMrUigP3bLdzir 9dlpaexcuD2XptsC1jWSM+qCdw/6lmU0gBWy/LRwDsO8tzIpGI2FMgMTuYTZZBOV wSwnhxlUZd7k9y+HbQiQNitMNGw4lAYySPeCi06XRO6TqP7Ea7CLMwtcK/sfLSwX 4c4Nc3omlKdZdC3d5kt2FW5gPzN3A0yxZ0hiJzgyFpBM/CFIi4tgpWXXN9i9Zjgw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeejgddutdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog fhohhrsghiugguvghnjfgurhculdehtddtmdenucfjughrpefvkffhufffsedttdertddt tdenucfhrhhomhephfhinhhnucfvhhgrihhnuceofhhthhgrihhnsehlihhnuhigqdhmie ekkhdrohhrgheqnecuhfhorhgsihguuggvnhfjughrpefvkffhufffsedttdertddttddp vffkhffuffestddtredttddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepfhhthhgrihhnsehlihhnuhigqdhmieekkhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Feb 2022 18:23:43 -0500 (EST) To: "Juergen E. Fischer" , "James E.J. Bottomley" , "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Message-Id: <4e17ff7295a96e31ed21ccb250c65b56c173b530.1645484982.git.fthain@linux-m68k.org> From: Finn Thain Subject: [PATCH] aha152x: Clean up struct scsi_pointer usage Date: Tue, 22 Feb 2022 10:09:42 +1100 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, PP_MIME_FAKE_ASCII_TEXT,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bring aha152x into line with 10 other drivers which assign scsi_host_template.cmd_size = sizeof(struct scsi_pointer) and avoid the "struct foo { struct bar; };" silliness. Remove a pointless scsi_pointer->have_data_in assignment. Signed-off-by: Finn Thain --- drivers/scsi/aha152x.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index 34b2378075fd..70f49fba66be 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c @@ -316,15 +316,9 @@ enum { check_condition = 0x0800, /* requesting sense after CHECK CONDITION */ }; -struct aha152x_cmd_priv { - struct scsi_pointer scsi_pointer; -}; - static struct scsi_pointer *aha152x_scsi_pointer(struct scsi_cmnd *cmd) { - struct aha152x_cmd_priv *acmd = scsi_cmd_priv(cmd); - - return &acmd->scsi_pointer; + return scsi_cmd_priv(cmd); } MODULE_AUTHOR("Jürgen Fischer"); @@ -931,7 +925,6 @@ static int aha152x_internal_queue(struct scsi_cmnd *SCpnt, scsi_pointer->phase = not_issued | phase; scsi_pointer->Status = 0x1; /* Ilegal status by SCSI standard */ scsi_pointer->Message = 0; - scsi_pointer->have_data_in = 0; scsi_pointer->sent_command = 0; if (scsi_pointer->phase & (resetting | check_condition)) { @@ -2971,7 +2964,7 @@ static struct scsi_host_template aha152x_driver_template = { .sg_tablesize = SG_ALL, .dma_boundary = PAGE_SIZE - 1, .slave_alloc = aha152x_adjust_queue, - .cmd_size = sizeof(struct aha152x_cmd_priv), + .cmd_size = sizeof(struct scsi_pointer), }; #if !defined(AHA152X_PCMCIA) -- 2.32.0