From patchwork Tue Jan 30 09:49:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 193931 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1106801dyb; Tue, 30 Jan 2024 01:52:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFfRt4ISrDPDNx1DQL9zdRkjyHBmVP9/PDm7GNYFpKy6binoIbOi2kLpjg+++h/pvjM3btm X-Received: by 2002:a17:906:f8c6:b0:a35:42e0:b96d with SMTP id lh6-20020a170906f8c600b00a3542e0b96dmr6008325ejb.57.1706608370056; Tue, 30 Jan 2024 01:52:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706608370; cv=pass; d=google.com; s=arc-20160816; b=DHRxId8gLwK1U9LYWsp5qCy2IEoAx/07j/+iTFNhAkSwljQEnhKNpLmWc7FC4RprME /JFAq1yvvlChtwmNjKSATlht2plSKaq/WH1TDlNpgvQ36BDum4p5Uj3Z4VyySTUTKOj9 w3tusAY/eJx0GpCjq2dj7c2cZmdGARuBuRcTq72wgt1Za6pIm2Ggy8gnZBHcswz9qmFX 7PxoR9aq3VCkxKgkhKDXYx4xgaAQLrCNGXNrhoNBveB0X6IihU26v7efw3dfGQZO1FsR T90YGMXmAQ7zExWBg4W56H1hg+tji2NOOFN3spAH20PQueibjgfu2LRV6b/5/xCNy2Ap kkIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=27sPDrpe8/aZxnXDluy+OFIcN/159xOHB1/FME7YSv8=; fh=n5BdL0bf9gAg+lJbD9hdO95/5FlrOLRCMPX4XUPPjVI=; b=ldwm1mBLnZ54EfUvJhNmikdsIGe7W9xf8F437B9paXyAd+0Jmqr7SGBRIWyG4Dt+rw 5nJ3bdO2JIv45Okpf7TReYsgEjGi/WDFt1YO5Lg3zqPnaowISzHtA9T+gKorUG279WrH i1zC1fNBNV0EkhDT4ap3iRdqEvyINzRh4MLcEDCFsMdqxRSCinTs0aefaLbP12cSmw+Q bzDuavXCEc68dk/GiuVnGr1L1F5wXlfGrQZd4QGlV+NqEcBIVoKdG6zSmkp1WNP5+5to v3xcjQZKrhMprVDmK/BDuqYpO2bRqCnOgEcNmgb5npHNXn47arHBc3ii+EYw947UBtr9 wpVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=OGCCW9Xe; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=OGCCW9Xe; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-44304-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44304-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id la18-20020a170906ad9200b00a35b9244637si1809870ejb.282.2024.01.30.01.52.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 01:52:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44304-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=OGCCW9Xe; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=OGCCW9Xe; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-44304-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44304-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 82B3A1F21A13 for ; Tue, 30 Jan 2024 09:52:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DE1B67E6A; Tue, 30 Jan 2024 09:49:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OGCCW9Xe"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="peLSmOep"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OGCCW9Xe"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="peLSmOep" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB8F25A796 for ; Tue, 30 Jan 2024 09:49:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706608192; cv=none; b=PtUhxSusql9cGZu+iUY8acw33tOGv0MlnPwpgwDFmocXzoT115gyA/1K+pkPvt6QjfVN5L1mErLZqqRwZeuVxZ7fSUp4Bpwp1W+OA5w0m8Nmc0WpMWt/ZIeOLK2MttR+hLHi/qFaaDl1o7s19LFAXNrO8bp1h9TE0uVYTVmRXmU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706608192; c=relaxed/simple; bh=Qn6AQ11CseQV/Mz0alL6Oo6R5cgAFihGMpvZ0zpAA6g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Wk+RYIo4hBYr5jD1UwHz1MyJf8Lcw8Rwv6FHYv05oJRgdsB9g9BCkOBEqEimTBOGqyoIlJkuJLb/D+rZBecjSu0XCfBYsPdGcvgZShagOBahgaa8z75YfRzhUZdafaxEbfrNux5k8Rcjz4pYitse/DRrllhFpeqggWMOk3hWb28= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OGCCW9Xe; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=peLSmOep; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OGCCW9Xe; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=peLSmOep; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1C93A222DA; Tue, 30 Jan 2024 09:49:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706608189; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=27sPDrpe8/aZxnXDluy+OFIcN/159xOHB1/FME7YSv8=; b=OGCCW9XeB/hTDR++E4t4oQPDQcZSiYsQr2sF0JSStgKjus11oeHlkAvqQ+sOW5A+yKAT7a 1cbBr5M42sQ3ARDbQr8XkLr65rUMclpdxwbyM+vPNLmDExNpD5qopWuOk7FHQoeyeIUHr/ OA5vJc1+YEyK2J8H3GkH9BG5SxjRtF0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706608189; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=27sPDrpe8/aZxnXDluy+OFIcN/159xOHB1/FME7YSv8=; b=peLSmOepDCuqEdQY2aY3DEk8NM9W7FDfpvSyIkHkCZ45Yq9mQOH6NFwpC5QzgRqKqszsq9 gEGok2V/Oij8/ACg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706608189; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=27sPDrpe8/aZxnXDluy+OFIcN/159xOHB1/FME7YSv8=; b=OGCCW9XeB/hTDR++E4t4oQPDQcZSiYsQr2sF0JSStgKjus11oeHlkAvqQ+sOW5A+yKAT7a 1cbBr5M42sQ3ARDbQr8XkLr65rUMclpdxwbyM+vPNLmDExNpD5qopWuOk7FHQoeyeIUHr/ OA5vJc1+YEyK2J8H3GkH9BG5SxjRtF0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706608189; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=27sPDrpe8/aZxnXDluy+OFIcN/159xOHB1/FME7YSv8=; b=peLSmOepDCuqEdQY2aY3DEk8NM9W7FDfpvSyIkHkCZ45Yq9mQOH6NFwpC5QzgRqKqszsq9 gEGok2V/Oij8/ACg== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 049241376E; Tue, 30 Jan 2024 09:49:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id mxlKOzzGuGWGbwAAn2gu4w (envelope-from ); Tue, 30 Jan 2024 09:49:48 +0000 From: Daniel Wagner To: James Smart Cc: Keith Busch , Christoph Hellwig , Hannes Reinecke , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Wagner Subject: [PATCH v4 02/12] nvmet-fcloop: swap the list_add_tail arguments Date: Tue, 30 Jan 2024 10:49:28 +0100 Message-ID: <20240130094938.1575-3-dwagner@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240130094938.1575-1-dwagner@suse.de> References: <20240130094938.1575-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [0.88 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.02)[51.68%] X-Spam-Level: X-Spam-Flag: NO X-Spam-Score: 0.88 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789508578236806688 X-GMAIL-MSGID: 1789508578236806688 The first argument of list_add_tail function is the new element which should be added to the list which is the second argument. Swap the arguments to allow processing more than one element at a time. Signed-off-by: Daniel Wagner Reviewed-by: Christoph Hellwig --- drivers/nvme/target/fcloop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c index c1faeb1e9e55..1471af250ea6 100644 --- a/drivers/nvme/target/fcloop.c +++ b/drivers/nvme/target/fcloop.c @@ -358,7 +358,7 @@ fcloop_h2t_ls_req(struct nvme_fc_local_port *localport, if (!rport->targetport) { tls_req->status = -ECONNREFUSED; spin_lock(&rport->lock); - list_add_tail(&rport->ls_list, &tls_req->ls_list); + list_add_tail(&tls_req->ls_list, &rport->ls_list); spin_unlock(&rport->lock); queue_work(nvmet_wq, &rport->ls_work); return ret; @@ -391,7 +391,7 @@ fcloop_h2t_xmt_ls_rsp(struct nvmet_fc_target_port *targetport, if (remoteport) { rport = remoteport->private; spin_lock(&rport->lock); - list_add_tail(&rport->ls_list, &tls_req->ls_list); + list_add_tail(&tls_req->ls_list, &rport->ls_list); spin_unlock(&rport->lock); queue_work(nvmet_wq, &rport->ls_work); } @@ -446,7 +446,7 @@ fcloop_t2h_ls_req(struct nvmet_fc_target_port *targetport, void *hosthandle, if (!tport->remoteport) { tls_req->status = -ECONNREFUSED; spin_lock(&tport->lock); - list_add_tail(&tport->ls_list, &tls_req->ls_list); + list_add_tail(&tls_req->ls_list, &tport->ls_list); spin_unlock(&tport->lock); queue_work(nvmet_wq, &tport->ls_work); return ret;