Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1273015rdb; Wed, 24 Jan 2024 09:48:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEk4PJCZrRqU8i3zaHnaBuebYuP+OAnqVVlDOTTvXtn5PeF0gLFrZrNZbIlMBcoleppdHXa X-Received: by 2002:a17:906:245b:b0:a2d:e4b9:45b2 with SMTP id a27-20020a170906245b00b00a2de4b945b2mr1001711ejb.66.1706118516004; Wed, 24 Jan 2024 09:48:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706118515; cv=pass; d=google.com; s=arc-20160816; b=YnfggoRYdRK/GG60yYnUAOELVK+zG2l3u+iMb9TOnC5eL4uYfTc0NnuQoxTjYJp6Es 6CXeJzMvb3hAD0cbLICYnzISEcrT0A8AfwZj37RnmKNXjwB/n4weE2lgO0idSAFK0DtP rVJ3OxJv01UyNf/knvPM//UFJWHjES/hz6VDvG9XvrwkJoSmggYsuFpOCcTrsHkEcTmw 8UzmlcqpvF+PnMadiyAdMhXvVm3rh2OMFSX7R1LdVddTtAc7UI0slAUiJ33Ti/Ef6AK3 iiOpD4AiT9ldCxt+zyNAVartwk+iZiWG5Es6A4MKXM5ffOGdy+dGwc/bkTIzrTH0jX5W V0oQ== 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; bh=5a7ZVpYjt4glIMRdLh4WlPExoPNat5beHZOUQY5BsC8=; fh=+EB6oBnXtBrxaPMIm1rb1kOyvjkddCLSgL4/UeSWQvM=; b=DUgzwuiaR2dKEK/Lsz5pfWwvkCKaJYPOZNGudLldwxP7jXnD8HVkPZ8eW1HFEvlF// 1WqTG3Z7LO1kXIaOkrPsXHYogkloIHDx09eZWdjCz2AveoGtB7a2rgNZ2bhwRwNKWAHf i+1sM0YdC7VlhQDMraBYnWdBeV04ugb3peL843D3a95lfjSRvRitbJpAmLgamUR265Xv w/wJjiUGrTrYhDAiN270ar5qP8efpu5mhj+3xiMDu1suayJTNnJknUAitPx8uVE4YOdM knVcsKrKtX+hHxKgy4PdEGoUhGkAvW0JE6y6K/fhcWBpjLxT9Ff/XuL/V962b6WaNZj+ jp/Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gGVqIQur; 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-37456-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37456-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k19-20020a1709063fd300b00a2e83b00d1csi92223ejj.498.2024.01.24.09.48.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 09:48:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37456-linux.lists.archive=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=@gmail.com header.s=20230601 header.b=gGVqIQur; 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-37456-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37456-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id B61501F2AD46 for ; Wed, 24 Jan 2024 17:47:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01247129A64; Wed, 24 Jan 2024 17:47:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gGVqIQur" Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (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 CC8D68615D; Wed, 24 Jan 2024 17:47:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706118437; cv=none; b=HP5k+GwkqWqV3C8yYTzIqe4cXcECY1AUoL3Ce45IwjvlJeGQcRL9NChxF2buMYRfdFfaNznSr801RvqayDXivv+Y06WZWriN2iQzfJ3CWheiCHhfn4Dx+0SZ3tNLuFAnSUTy9Tc+MGdL7lRPW8YJkZlXxKicb8HJGwSavkps/8c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706118437; c=relaxed/simple; bh=s3tKx9YDYT51+QXp1CdeWhCE59bgmZCtnv1eFlCrWyA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UqcKer7nXnKJ2SQlY9uZHOj+4RRgganNot1FvqJZ5xTognlQ4XWOW7cidroklDEA3wqTnTWhdgIIIXTMsSlqWiCvbbexwqU2URTai68RqCc+2sd80v3lhkwkX36AeH/Y6Hj8a0fUBISXTzMsXDpPGJ5hKn03l7XXURr5jJwSYTs= 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=gGVqIQur; arc=none smtp.client-ip=209.85.210.175 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-pf1-f175.google.com with SMTP id d2e1a72fcca58-6dd7b525cd6so1636913b3a.2; Wed, 24 Jan 2024 09:47:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706118435; x=1706723235; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5a7ZVpYjt4glIMRdLh4WlPExoPNat5beHZOUQY5BsC8=; b=gGVqIQurEaMo3tLoJeZrqMMO0q7AatnxmBmqh+1djVTSm2bm60kLE/LMm5eDbb6ngw dPZ3ddh95LSC9YPDGZ+xFWDQb/7r5bTXtQRF+K+BpTivCl16EsBGyoGJvPHC69Dp/UJ+ HoSb+7uwc8bI6ZBcdN/gf8aykBG/FK0WZXrRhqhhUdpPZXUtSjflU4S+7cZWtGcwB13n NM3Hi9ykeQoDAeE1DYKiDuQtwZaxyIBNb464xAkCqEUwHOQRlHUTPyNd7Vxh+0B46zzc 7l0jHrNKncPfmIOpdt6AlpakRbwHp9LwUnTYPaOaZOPVUowgUXNHzMWYWOWAXb/2nDPD +Kqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706118435; x=1706723235; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5a7ZVpYjt4glIMRdLh4WlPExoPNat5beHZOUQY5BsC8=; b=DLSJLD3n3ePYiKa8lrTDqgX9JJepVUvIDaXPwFT9d0xe7p8w5jdGUyuPLkV2mWXmXb ui9rECgyH2+2I7ojaon1+eY6IlndjlwI0Sge7huCguUjH7uJ/V6PUkNGzEuHnVKekmy4 3SmjjXAHf+b9fPUt9iKXqMXM5dEs9KDOq46pkCO5Q8rBzdFqSgsDd56mErAUVfM2iczu CEXJrMjvpcVwMw6P/530XFhxaXKRTM+2XRLSR4P5ND4FaTExv4L6MBOuaBNkkf3vfF9e xyatO5XwrNyiMnda3aoD3lu/nEY0qG9sXGfgEFXlR2I8q1J56mHLz5sRwE/bZduowze4 XlWg== X-Gm-Message-State: AOJu0YzzBDE53WdJ7vl11GLskOUwYMmivrikYno7n3O33rYBgvsJC0Dw ojGxbS4Quck+49AXn7Oa8okm9HXVzyBxpimuIaUdwfNCaoZxhPo2xuucJF4x X-Received: by 2002:a05:6a00:1d24:b0:6dd:c48c:4d8d with SMTP id a36-20020a056a001d2400b006ddc48c4d8dmr102079pfx.46.1706118435122; Wed, 24 Jan 2024 09:47:15 -0800 (PST) Received: from localhost ([2601:644:9380:8cd0::7fb4]) by smtp.gmail.com with ESMTPSA id y22-20020a62b516000000b006dbd2405882sm8401518pfe.148.2024.01.24.09.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 09:47:14 -0800 (PST) From: Matthew Wood To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: leitao@debian.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v1 1/8] net: netconsole: cleanup formatting lints Date: Wed, 24 Jan 2024 09:46:59 -0800 Message-ID: <20240124174711.1906102-2-thepacketgeek@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240124174711.1906102-1-thepacketgeek@gmail.com> References: <20240124174711.1906102-1-thepacketgeek@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Address checkpatch lint suggestions in preparation for later changes Signed-off-by: Matthew Wood --- drivers/net/netconsole.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 6e14ba5e06c8..93fc3b509706 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -49,7 +49,7 @@ static char config[MAX_PARAM_LENGTH]; module_param_string(netconsole, config, MAX_PARAM_LENGTH, 0); MODULE_PARM_DESC(netconsole, " netconsole=[src-port]@[src-ip]/[dev],[tgt-port]@/[tgt-macaddr]"); -static bool oops_only = false; +static bool oops_only; module_param(oops_only, bool, 0600); MODULE_PARM_DESC(oops_only, "Only log oops messages"); @@ -501,6 +501,7 @@ static ssize_t local_ip_store(struct config_item *item, const char *buf, if (strnchr(buf, count, ':')) { const char *end; + if (in6_pton(buf, count, nt->np.local_ip.in6.s6_addr, -1, &end) > 0) { if (*end && *end != '\n') { pr_err("invalid IPv6 address at: <%c>\n", *end); @@ -510,9 +511,9 @@ static ssize_t local_ip_store(struct config_item *item, const char *buf, } else goto out_unlock; } else { - if (!nt->np.ipv6) { + if (!nt->np.ipv6) nt->np.local_ip.ip = in_aton(buf); - } else + else goto out_unlock; } @@ -537,6 +538,7 @@ static ssize_t remote_ip_store(struct config_item *item, const char *buf, if (strnchr(buf, count, ':')) { const char *end; + if (in6_pton(buf, count, nt->np.remote_ip.in6.s6_addr, -1, &end) > 0) { if (*end && *end != '\n') { pr_err("invalid IPv6 address at: <%c>\n", *end); @@ -546,9 +548,9 @@ static ssize_t remote_ip_store(struct config_item *item, const char *buf, } else goto out_unlock; } else { - if (!nt->np.ipv6) { + if (!nt->np.ipv6) nt->np.remote_ip.ip = in_aton(buf); - } else + else goto out_unlock; } @@ -781,6 +783,7 @@ static int netconsole_netdev_event(struct notifier_block *this, spin_unlock_irqrestore(&target_list_lock, flags); if (stopped) { const char *msg = "had an event"; + switch (event) { case NETDEV_UNREGISTER: msg = "unregistered"; -- 2.43.0