From nobody Wed Dec 24 03:32:21 2025 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 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 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 Content-Transfer-Encoding: quoted-printable 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 Content-Type: text/plain; charset="utf-8" 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 =3D -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 *targ= etport, if (remoteport) { rport =3D 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 *targetpo= rt, void *hosthandle, if (!tport->remoteport) { tls_req->status =3D -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; --=20 2.43.0