From patchwork Sat Aug 31 09:58:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Li X-Patchwork-Id: 13786012 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38F9DCD1293 for ; Sat, 31 Aug 2024 09:50:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD0538D0020; Sat, 31 Aug 2024 05:50:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D5B968D0022; Sat, 31 Aug 2024 05:50:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 963E38D0020; Sat, 31 Aug 2024 05:50:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 53E018D0022 for ; Sat, 31 Aug 2024 05:50:34 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 0440CA0AAA for ; Sat, 31 Aug 2024 09:50:33 +0000 (UTC) X-FDA: 82512070788.18.7C34B09 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf27.hostedemail.com (Postfix) with ESMTP id E44A24000D for ; Sat, 31 Aug 2024 09:50:30 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=lihongbo22@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725097740; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RAX3qFzXZZq5vuuJDClx2gAZYh+9Y7N02op5JW99ayQ=; b=jie3gxrNpK3apPJ33optpApKYcP7w0Q4yGelsXsuL/0VEXeH5ielhlzV5k0vBxRS8LvdZH 0gSIAZFVBqOOkwOQCReUnoMS9TmcS12DD5oht/znOQo0MTuCdnS+/qkWGKnmnm5DKwXY5V o9Homn02C2j8biBXV+yeHjrxeB2A0qE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725097740; a=rsa-sha256; cv=none; b=Dcv/moC7q6jyuA1gQKN+SkGxMoSPiXYWo3AJyFOL8H97i6DU8CUtO++8b8R11pFcQgeUD4 bbaawqYBeY5czoPc9tb3exuufsLgSZDwnobJrLR72RLBvfTnKtXpRzfyPgcUGh5ZFQCQxy MVb4bM8bFG/0nlD6Fwzh5J4YN/s37xQ= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of lihongbo22@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=lihongbo22@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.252]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WwqxB6N7fzyQxV; Sat, 31 Aug 2024 17:49:34 +0800 (CST) Received: from dggpeml500022.china.huawei.com (unknown [7.185.36.66]) by mail.maildlp.com (Postfix) with ESMTPS id 439BD1800CF; Sat, 31 Aug 2024 17:50:27 +0800 (CST) Received: from huawei.com (10.90.53.73) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Sat, 31 Aug 2024 17:50:27 +0800 From: Hongbo Li To: , , , , , , , , CC: , , , Subject: [PATCH -next 2/4] tun: Make use of str_disabled_enabled helper Date: Sat, 31 Aug 2024 17:58:38 +0800 Message-ID: <20240831095840.4173362-3-lihongbo22@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240831095840.4173362-1-lihongbo22@huawei.com> References: <20240831095840.4173362-1-lihongbo22@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500022.china.huawei.com (7.185.36.66) X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: E44A24000D X-Stat-Signature: utjjqdcsgiint7h3ucwynuy8gst3p66z X-HE-Tag: 1725097830-149539 X-HE-Meta: U2FsdGVkX19Tq0+SfrzgzGVqyTR/i3+vr4N1eZP1HcdxNF0+Tbwcl4rEiXAKfPLeDpdggjVFpN8oeYi9W8RtjCucCAORzwuACDY1W+AFFs+dbHoLjyplPm9C02u3zS+52L2VVwJ2QecyWsZV5Ca0wM6MoQKxvFm1JW93Wr1wNKTv/b2NHK90YmULRu4WuGOMPQQAUzOrKYR23DIKyGzBd3XmOcJv22c4+AqTyp1nX25TxixSRuPU4i1khUgv35HpgFrc3PJ61JgPwHH7F72lY0cog6NEk/G5PUiJrvrR2cS2aoN0Je/+qWLyp30xzHyyPgKhfc36y+7a9Mje9cLJ5AfSxilrylZfZ9WIc3SgQxkx/fExVq+m+P8yKSgD7nr3wvnbesCddQ+jvTg2abWuVUHtUroH2JRBPkHskZmUSXB03bq8iN6Ke/5iRYT2OVOHrofkvYle15mck1zEAecTEZR4yR1yf6Dck5/hZ3lnZlGBtfVeoXOW4LQtnFY9mpif3FW2ywkFoifxmr0Ldrq5oANnysHGMs/li1OLn1rd6AHNfDMGPF1pt3r2mKPqXGlfHPXRtv7kkCgr0aTkXcpY1QN86MhpqeStkge2NE7FKxlt97nlM9+44KDbd1HrZq7YUhUtQ+szp6SQCsehnhEPAyzuJLFqX980jaKLFjHzYZ2dNw0PsIaswmfrSm06Y8ryuZgfV0Y/v0K4UQETlVl7fIKeyfZoKRiA027iJYduyY/NCw+YKJv6G/0LJbng4XJ6+dPpPBIYoQcrbbqzRYC1qAKZV/LPoc0oHSi60/Lzy4QiF38elJ4L4gFmzx+7EZ56FXm9kRn65XBnjcI/rOFaHoeBuuRsURGBls8+ZgCmcztYDzu0HiCQCY2NRjRdP/ToeI5YcL5NIBaRlO6Jg0vV96qEBuVkSus+JbFqx0RZGtP29kdXQ9Auq0ZDwMaSFj3IShbOpFmaEy6GQLSQ0bt CBZ/mpuh murAEuExy9ObdzF9eAfHx/JyKW1Fd07IHiRPT9zYMG5h62MptEV5sbbdih1/wlrT7QMSgS4oMvr0D9kPmWz3RT344cqf9XFgMwKEkkmI2GNFykj/qdpLwrwaVGwb68cYdYLKqspUzszt2k5U/YxI82jRepp5ILtNxKYJj7G4FFuwQfcSgYvNfaoERmUx13Q2yY0MEuIx+mWdROg7/5V4Uw6M5HqF9TXR+EUIXxcJi4vTdueQXtf0IeMpNHSpjYCshdblIyPHm7LLtGYA= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Use str_disabled_enabled() helper instead of open coding the same. Signed-off-by: Hongbo Li --- drivers/net/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 6fe5e8f7017c..29647704bda8 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -3178,7 +3178,7 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd, /* [unimplemented] */ netif_info(tun, drv, tun->dev, "ignored: set checksum %s\n", - arg ? "disabled" : "enabled"); + str_disabled_enabled(arg)); break; case TUNSETPERSIST: