From patchwork Sat Sep 4 15:07:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Schoenebeck X-Patchwork-Id: 12475805 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85041C433EF for ; Sat, 4 Sep 2021 18:30:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7340660F91 for ; Sat, 4 Sep 2021 18:30:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237392AbhIDSbn (ORCPT ); Sat, 4 Sep 2021 14:31:43 -0400 Received: from lizzy.crudebyte.com ([91.194.90.13]:53875 "EHLO lizzy.crudebyte.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234085AbhIDSbm (ORCPT ); Sat, 4 Sep 2021 14:31:42 -0400 X-Greylist: delayed 1838 seconds by postgrey-1.27 at vger.kernel.org; Sat, 04 Sep 2021 14:31:42 EDT DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To: Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID: Content-Description; bh=Tut7eTe5qe1gcpJfndZBSuyDAml0NcR3QWvzUhKfSJY=; b=oYHno iRcK+FKCG4rE4dKoOsvOtE16e06TIYCMX1cdpwU2WFr43Uym6XV0ppIsplej2Z8glajT79hBJ3Ujg TnIKexznxmAoi2a4UzTPyC1B3DB/6fxLefXyH3mcD9izODJeJAQE3p63zolbw//aflxsD2UAEns4F /GY3x7TsVJp1CwLKIZtTJ5QJfLJEff5hhB77DjML2jbl2NkyT8ZKlUpkU3Z84Xnd5+5XApgvwB1zJ FMg/OsVKjxnIkbxpEMgEph4g4Y2lKg2K/mFNxCB6URN4IqZXcSmsj5HQE/TxW3f1nVebF6+ERxoce G5+OCVjw4XtQ9d+tHZulD4BHwprGg==; Message-Id: <28bb651ae0349a7d57e8ddc92c1bd5e62924a912.1630770829.git.linux_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Sat, 4 Sep 2021 17:07:12 +0200 Subject: [PATCH 1/2] net/9p: use macro to define default msize To: v9fs-developer@lists.sourceforge.net Cc: netdev@vger.kernel.org, Dominique Martinet , Eric Van Hensbergen , Latchesar Ionkov , Greg Kurz Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Use a macro to define the default value for the 'msize' option at one place instead of using two separate integer literals. Signed-off-by: Christian Schoenebeck --- net/9p/client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/9p/client.c b/net/9p/client.c index b7b958f61faf..1cb255587fff 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -30,6 +30,8 @@ #define CREATE_TRACE_POINTS #include +#define DEFAULT_MSIZE 8192 + /* * Client Option Parsing (code inspired by NFS code) * - a little lazy - parse all client options @@ -65,7 +67,7 @@ EXPORT_SYMBOL(p9_is_proto_dotu); int p9_show_client_options(struct seq_file *m, struct p9_client *clnt) { - if (clnt->msize != 8192) + if (clnt->msize != DEFAULT_MSIZE) seq_printf(m, ",msize=%u", clnt->msize); seq_printf(m, ",trans=%s", clnt->trans_mod->name); @@ -139,7 +141,7 @@ static int parse_opts(char *opts, struct p9_client *clnt) int ret = 0; clnt->proto_version = p9_proto_2000L; - clnt->msize = 8192; + clnt->msize = DEFAULT_MSIZE; if (!opts) return 0;