Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp438498lqp; Tue, 11 Jun 2024 08:42:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCc2Yb2My/CVAMrP+WZmZKvU++JFCDc81pgpZ3AADX54hIWRd7Zvocp/PqwaVDDPbD7VsuqnFYa+VeEZa8u0rGu+12o7gSQkKinzv78Q== X-Google-Smtp-Source: AGHT+IHdHspFtVBFlo57ctvuGAEVDbOPMQGpdme/B0a7kDqK/LK2aAsiTFNWEaFAqSWVSeV4n9hn X-Received: by 2002:a05:6358:60c8:b0:19f:436b:f6b0 with SMTP id e5c5f4694b2df-19f436bf81emr1076498755d.4.1718120569418; Tue, 11 Jun 2024 08:42:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718120569; cv=pass; d=google.com; s=arc-20160816; b=oZKmn68hWYs62T0eInaOak+EV/Xj341kIuUNkewjQ0AgJH1L2MglnB0NmySNhBNDxl Ppoi2//VbAI/8j3G/9Y51jJgwsaetuXS2ibDlT4KzBrhfrylKi1o6+7nxDsXT1uMv3rr vC1IWdIqSoS2/3xaO4myJtqQp233YszKPanX1X+lU6+2qcVm62krLLLdTSzbRCGkeLdz +KJhnVUib0apo7JkzZkS430kRhCpNy/CAnlbwsavLcDA6AprzEzqK0LjuAEqFx9sHcTr qS3v9cEMBy3IgjWjgcQ8DPyBM3uGn6VIuS6qVgQRLM8gj1bsxCoAcUGrX65mSplzOATD 1Zwg== 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=Z0Vgu6hdIvIVHzLZcergBK6nr3ePcLKNG4v8w8fbW/8=; fh=bWyCrYUFzDjLy2sIYB1FD8sHfD8Ci8kjORi9DjgY6eU=; b=TjrZ9jzgBuixUKtsFSINAwo6XttUPIS70CQmVDG1k1KvhBDxyGDFjM06/iokiIhPsx XY52/eP2AfzT+w0WiqERFefCBvrGeF/baySVin2502wzYyy/849IkEVykpGxi0vroc72 0zlv79ctfTA/jwkPCYBg/ZBYOsC37UloGFyHtJ1Ad+aH9p2wHwoWFnm+tFxcFKIuJVup hbTzoSjI58H4FuDHHcBrLQLk9/lHnbp3MPk3Zi2u6opohKe5NCjzikZ2O19vFA6MHj1M 65C2aDV0Op2exxXRSez7QJ+wOciqMt7Pd+zrqUvurumoO4bw9rt3t3ll3ZSwfLYTF8+S Xb+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=dGNevke6; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-210167-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210167-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de2a280ef6si5604673a12.802.2024.06.11.08.42.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 08:42:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210167-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=dGNevke6; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-210167-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210167-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0215B2824CD for ; Tue, 11 Jun 2024 15:41:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 920F436AF8; Tue, 11 Jun 2024 15:41:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="dGNevke6" Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 359DD1862A for ; Tue, 11 Jun 2024 15:41:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718120503; cv=none; b=cdhBx/MT9ZrPi7Ahpn5B3dK3n8zurfdYXYvhumVvayPvqOJycL7MONVUe7YGOIC5fjekI8ot5dpODiAbOXPh1CHohToEiY71DBKiE28BYoqPw15N3iqXJg8nfCmD7TH3/INrqSNOBBuSEwAkLLO3xRiTcwPSs+lYEdDGPyjTjHM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718120503; c=relaxed/simple; bh=E7PkwxBj5hvjoSwhWq7vLXyWlMSKGIv0zHOZ74URHic=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=fm91FILiB0IlFZspukncCbxQ/0ClFmj1mcmtWKwNhPuEP0+0Sx5Lf5SJKTS8lM2nEwCGsubX7Ndxf5pkmbShIz2d4k+cRnWKd/48ZD5/S2eFD3ZGgFIL++LuXkkf6qT3d0Gn/XHSLIYvNq22LhR2mKU7AniZSMjfPdQirdCFbIs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=dGNevke6; arc=none smtp.client-ip=95.215.58.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: radhey.shyam.pandey@amd.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1718120500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Z0Vgu6hdIvIVHzLZcergBK6nr3ePcLKNG4v8w8fbW/8=; b=dGNevke6WTxqQAkrfIqw7QRNI0mRnNauqDnz1hh7etTXzDWMMq6lWSatpTUZyMvsPlZb66 afA3090PWTNdLC/gZ6UqGAhlIC80BR7ABNilvA01aa6kYf30ZbkfQlJW8gp5YgK/4fTsYg AIGtZK7Y8MTD4Qlfd59KKs5B6duTrGo= X-Envelope-To: andrew@lunn.ch X-Envelope-To: netdev@vger.kernel.org X-Envelope-To: kuba@kernel.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: linux@armlinux.org.uk X-Envelope-To: michal.simek@amd.com X-Envelope-To: pabeni@redhat.com X-Envelope-To: edumazet@google.com X-Envelope-To: davem@davemloft.net X-Envelope-To: linux-arm-kernel@lists.infradead.org X-Envelope-To: sean.anderson@linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sean Anderson To: Radhey Shyam Pandey , Andrew Lunn , netdev@vger.kernel.org Cc: Jakub Kicinski , linux-kernel@vger.kernel.org, Russell King , Michal Simek , Paolo Abeni , Eric Dumazet , "David S . Miller" , linux-arm-kernel@lists.infradead.org, Sean Anderson Subject: [PATCH net-next v2] net: xilinx: axienet: Use NL_SET_ERR_MSG instead of netdev_err Date: Tue, 11 Jun 2024 11:41:16 -0400 Message-Id: <20240611154116.2643662-1-sean.anderson@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT This error message can be triggered by userspace. Use NL_SET_ERR_MSG so the message is returned to the user and to avoid polluting the kernel logs. Additionally, change the return value from EFAULT to EBUSY to better reflect the error (which has nothing to do with addressing). Signed-off-by: Sean Anderson --- Changes in v2: - Split off from stats series - Document return value change drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index c29809cd9201..5f98daa5b341 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -1945,9 +1945,9 @@ axienet_ethtools_set_coalesce(struct net_device *ndev, struct axienet_local *lp = netdev_priv(ndev); if (netif_running(ndev)) { - netdev_err(ndev, - "Please stop netif before applying configuration\n"); - return -EFAULT; + NL_SET_ERR_MSG(extack, + "Please stop netif before applying configuration"); + return -EBUSY; } if (ecoalesce->rx_max_coalesced_frames) -- 2.35.1.1320.gc452695387.dirty