Message ID | 20240215092630.148917-1-pairmanxlr@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-66534-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp273438dyb; Thu, 15 Feb 2024 01:27:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVJssklrrj4lQPH4Vt0TaWlDuOWpKpfp+ODw6/1AG2kTeagedOtECI26rbEAG3RSSl7jchZTe1Vm8TGWwG7OOO6q7H2EA== X-Google-Smtp-Source: AGHT+IEwtNP2zP59a8drUDAdNhRGCBxZL3b6rGgn1ab4nqtlk/VbbGbaqmOvsY5UuYSng37KmsGK X-Received: by 2002:a05:620a:410a:b0:787:177c:6bce with SMTP id j10-20020a05620a410a00b00787177c6bcemr1121756qko.28.1707989277167; Thu, 15 Feb 2024 01:27:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707989277; cv=pass; d=google.com; s=arc-20160816; b=EQC35+WGZZGYsWQUboeZGa5kSFvdpsPtNm7ScSoGh1f5DixgpQqwAugN2pA13d+wpo LS3d+NvVblkZfySyW6QMxvsD8sbRx+MXS2T0wY1Ve+OJgAkvQ00oar5TtW4t73QOctFk HEcW3U3xTtlRvHHDoI+hHkxb7/Kt0HYOOLw6vlQt7gR8Ror7W7T52kmEfFsPx0kp6AH9 5eysL1lnSh7OhmN8AUG77uQNZ6KivwuqkOCDdJD59MYwRS0RCNRa7R0tQdnqoGwG5/vY SQSAzurm8Z7fVEqiyY0SowidJVqtUYi7EFZk7SD6IwSoGHUVD43ZT1iRQnrXr7WHK2Pz e3Bw== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=OWfMmIfGsKwjYTHONZVgXvpgh2ggyJHKL+IgNdm0LAY=; fh=WbUyXrlgLimhlvmDHhoAGwECw23HxXTiA4mqYaRDll4=; b=vtYEPj+tIWI1D0UzxBbVdJm0Zw4Fo5OwE4ofEATam9Feious/DPJVHwvQQO8ClI85m UFbn3XKTZr14tTs0TZI+qTuoYspnBvXBR9Gh+RmQ0wRF2pWPinFW/hzzSHog00J3NTpE KK+vjsQ4cp/r9rMZYnnGgQPcQNbicVnshzl03evLzuwvGtHJPc+WSaefvXw0UirGBqUy hBrDlMvpOES+fIqYwt1sg6TSYMeE+3NzHRgqhGaSWjDtsKf0drgaSQ07beD2AFm8UX6t Yrst/O8wSQYjNQdi0Hyw8iM4TBeB0a4kWpjAg6lQT3Vo7uM2ATAswJw6QUeVA8SkuXp4 OIHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RXcCXpZ1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-66534-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66534-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a14-20020a05620a066e00b0078737f620fasi480597qkh.541.2024.02.15.01.27.57 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 01:27:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66534-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RXcCXpZ1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-66534-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66534-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EC7EB1C21952 for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 09:27:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B57A61B969; Thu, 15 Feb 2024 09:26:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RXcCXpZ1" Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 E58731B27D; Thu, 15 Feb 2024 09:26:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707989217; cv=none; b=IsfWyy9iKfT0vNoVojGOLRb00dsmc1bXIjXbpouXgOwwISj5aGL2LESHCDQFbYvjY59gFIRA7Z2IIy5pp+fpVzDO9K/mYcA6ZwUlaS2VCNbVqdccq5L2jrzdzN7TLxV6reKVA92ADBCAAwsSLkKOg8jNt7F0dzb/uJCN2EqOXHQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707989217; c=relaxed/simple; bh=E2v6VkpFCx1HDTq9sKiAbC9tdSDEbT2SS+fM9nv71m4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=J5J7I5KOapwCveRNmeqly12ALi7K6Hhjckbhb0zw/OIvnade5KXc1mTsuxmkd2wGVFmcT/7/FiUNEcp34gEEAhMfS/Qj572xdHE/05EqYX51aVImPR6Jjyxi4qvKrbKLE6bP2hnLQCGtZ7zcVZXU9NT3HoUCQTaY7VwkQ4o8/HU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RXcCXpZ1; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1d953fa3286so5296995ad.2; Thu, 15 Feb 2024 01:26:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707989215; x=1708594015; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=OWfMmIfGsKwjYTHONZVgXvpgh2ggyJHKL+IgNdm0LAY=; b=RXcCXpZ1wpypDGIOdOK/Mjt2m6wvWvaDU00+Ha010rY5hutwK528Hun96aEtBkvN/3 Zia585ezsifeNNcqXSu4ateRmllSXJTv2utuPG+mvMr4Ankao1INUvjEazBYKqw0PvUB nAPTdEmsRDhXGMsbGB/Kpvv6A/NdXgPAX7+D/oIz4LIGlLMGgYkNPm8cdM4huVjKEPj+ /Pk/pgJTYqdTqRmGqTqSTXQbgu1Q2MR6Hd5d9Tb8S5i+NvOPm9xiW6m6ghuJfISAhusq liQKwEOW/4smKDUDMU84VRb6l7gc7HtlH9uLvtG56nnjV7qfqWt7xvpQnjUCgwTcIGOr tL5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707989215; x=1708594015; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OWfMmIfGsKwjYTHONZVgXvpgh2ggyJHKL+IgNdm0LAY=; b=RHtCJitcMm0W/M5ghWe2G/+z0/w5xjltGLmOUg0NEPh+ogmwBc044wTIU5RcDggmsi SAQxYpcN8oE8wyqXoGwocDc44nxi+lssg5tcvy0sF73YXIOgYahPwQzomfzfg3Gz/DYR HDYwJDu+4P2EGS/bYxPtn4bMee4A6tVlYMzYTm1a1etArJpyTJXARbZdL+8RjqdIamqX SoMJ5txScWsER8vZ+qhnenhszutdPGOGamKLUdiGkKCI4OMtya0h2XW9pI+M1o/YrR3c gtenZUCrnw7XImyA7s+tuVt/pGJwzOgshxnLW443Q22ezNnlqODPXUvB7p1STtkKiz2z 2qnw== X-Forwarded-Encrypted: i=1; AJvYcCWDlg8oeWOuPwr4tf/uLilZehwqmA8boDfHoeCRGkAltyq3CkMqhlMQpluw30znyAjo+sCVCNpb94jzCFCUEo2rzp0KoFcNsKirhAri X-Gm-Message-State: AOJu0Ywhh3wICPrY9jQe83CUrIc+9zz6rUkWPt7ltKqYJ74KxcChznKv Iec+MPa34YFqrKTfoNfy++X/wzXQvBt99YlilP16PpQatx+0dPg2 X-Received: by 2002:a17:903:2601:b0:1d9:aa5d:a50 with SMTP id jd1-20020a170903260100b001d9aa5d0a50mr1017745plb.25.1707989214966; Thu, 15 Feb 2024 01:26:54 -0800 (PST) Received: from pairface.. ([111.18.198.117]) by smtp.gmail.com with ESMTPSA id ko4-20020a17090307c400b001d7137acad9sm838088plb.57.2024.02.15.01.26.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 01:26:54 -0800 (PST) From: Pairman Guo <pairmanxlr@gmail.com> To: valentina.manea.m@gmail.com, shuah@kernel.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Pairman Guo <pairmanxlr@gmail.com> Subject: [PATCH] USBIP: Use fallthrough pseudo-keyword Date: Thu, 15 Feb 2024 17:26:30 +0800 Message-ID: <20240215092630.148917-1-pairmanxlr@gmail.com> X-Mailer: git-send-email 2.43.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790956564197314635 X-GMAIL-MSGID: 1790956564197314635 |
Series |
USBIP: Use fallthrough pseudo-keyword
|
|
Commit Message
Pairman Guo
Feb. 15, 2024, 9:26 a.m. UTC
Hi maintainers,
There is a usage of ``/* FALLTHRU */`` in a switch statement in main()
that have long been untouched. This patch replaced it with the
better and proper pseudo-keyword ``fallthrough;``.
Please merge if it is the case. Thank you in advance.
Signed-off-by: Pairman Guo <pairmanxlr@gmail.com>
---
tools/usb/usbip/src/usbip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Feb 15, 2024 at 05:26:30PM +0800, Pairman Guo wrote: > Hi maintainers, > > There is a usage of ``/* FALLTHRU */`` in a switch statement in main() > that have long been untouched. This patch replaced it with the > better and proper pseudo-keyword ``fallthrough;``. > > Please merge if it is the case. Thank you in advance. This is not needed in a changelog text. > Signed-off-by: Pairman Guo <pairmanxlr@gmail.com> > --- > tools/usb/usbip/src/usbip.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/usb/usbip/src/usbip.c b/tools/usb/usbip/src/usbip.c > index f7c7220d9..ddcafb5c7 100644 > --- a/tools/usb/usbip/src/usbip.c > +++ b/tools/usb/usbip/src/usbip.c > @@ -165,7 +165,7 @@ int main(int argc, char *argv[]) > case '?': > printf("usbip: invalid option\n"); > /* Terminate after printing error */ > - /* FALLTHRU */ > + fallthrough; Did you compile this? This is userspace code, and as-such, I don't think it has this keyword, does it? thanks, greg k-h
On Thu, Feb 15, 2024 at 11:14:49 +0800, Greg KH wrote: > This is not needed in a changelog text. Thanks for telling. I'm new to lkml and still learning about the format. > > tools/usb/usbip/src/usbip.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/usb/usbip/src/usbip.c b/tools/usb/usbip/src/usbip.c > > index f7c7220d9..ddcafb5c7 100644 > > --- a/tools/usb/usbip/src/usbip.c > > +++ b/tools/usb/usbip/src/usbip.c > > @@ -165,7 +165,7 @@ int main(int argc, char *argv[]) > > case '?': > > printf("usbip: invalid option\n"); > > /* Terminate after printing error */ > > - /* FALLTHRU */ > > + fallthrough; > > Did you compile this? This is userspace code, and as-such, I don't > think it has this keyword, does it? I'm sorry for my hurrying. I ran ``make tools/usb`` with no warning or error, so I sent this patch. Now it turns out ``make tools/usb`` doesn't cover tools/usb/usbip. I tried again with ``./autogen.sh && ./configure && make`` and it indeed failed. Since usbip.c doesn't have any reference to include/linux/compiler.h, it cannot use ``fallthrough``. Thanks again for pointing out this error. Thanks, Pairman
diff --git a/tools/usb/usbip/src/usbip.c b/tools/usb/usbip/src/usbip.c index f7c7220d9..ddcafb5c7 100644 --- a/tools/usb/usbip/src/usbip.c +++ b/tools/usb/usbip/src/usbip.c @@ -165,7 +165,7 @@ int main(int argc, char *argv[]) case '?': printf("usbip: invalid option\n"); /* Terminate after printing error */ - /* FALLTHRU */ + fallthrough; default: usbip_usage(); goto out;