Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2188064rbb; Tue, 27 Feb 2024 13:37:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWr+CRvmLqCODstMxUGzhz/5ryU0qNc5AhRQsvOSmpVqTJpX0OpRbTWh0JUqbE1x+ccwqdzbrZkOTlZUaXA4MfdylgHUd2DQH3LETmvXg== X-Google-Smtp-Source: AGHT+IFlXe5oaAiIw1MOUuH9RoX/WkmFIews7xBayOF5QhV26AGj5TpF70mwd4ehskiioPyX18Vc X-Received: by 2002:a17:90a:db86:b0:29a:2860:28b9 with SMTP id h6-20020a17090adb8600b0029a286028b9mr8475526pjv.48.1709069822372; Tue, 27 Feb 2024 13:37:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709069822; cv=pass; d=google.com; s=arc-20160816; b=kgAnVS/DQgwB29MlFeb8mlpCjakBSTgdLfgoVg/RKfoqdjIp9Vtv8BeVWVj7MyLwNi kofH8jaGy+lqINr+qly24tWUdupvFu1NlQnJ64uOpyuP0aZ4qWERw8cSEaTH6D2ba3A3 Ttv0gL/DxjxhdI/s/y5UZmDabkO2P4aRmgucVcK9eOt+lQNy1lrUNm5zBAaZE/MiHgTZ R843CnwiuAXPWbkQL4ou7fq9hC3pr5sxze69QzBoMtEwh4Yt/LTe7oLr+V1BVV5AEtV1 RksM02yiv9ngDYrc2HDRHMahhZaPFDuzNgP9f4bdw8AIOIM2WD6A/yd7QrKECAhRaKn5 oNLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=CyLM2peJrFAifPmicMExNhW5vywSkBdiJKIglRNJbBQ=; fh=GzFMTIrFmEFmwRs/jPoY1tnyiXO1u6N76XCNXKYlfoY=; b=JMUZnfLTA6DVIOIMBaghOG641fQROdPCXv5pdfmfIlzYxIpwC/VSOT/Td9lzwFsX7l DYbTnAsSq9NjiFDl8/D6YCStwzJt58WNsQzP/BzzPzCc1IU1NhcLRRwsS4pMn0vIlIhf oDZUZ3x2QNXZ9/TsC5eJXwDbZ44wvelt+574eB0uYyJpnC6/7U9iHLRophL4H+Jhd02G z8VqexLYBDVRlqs+7sVAvM4wttpUVGv6OKRl1esWVXpkOms+zYXNL3h/msBy/YCtoIY2 1jPa/XLzl6NsbMnGzvtNPkp8q4q32yb8tHy05OWbYWnocdmucxAyw0zJBcsdb1u1MXuJ sAbg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eo6G1mRu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-84006-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ft18-20020a17090b0f9200b0029a3c01e4a1si9992pjb.139.2024.02.27.13.37.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 13:37:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84006-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eo6G1mRu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-84006-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B9D35B2C544 for ; Tue, 27 Feb 2024 20:58:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3386E14EFF8; Tue, 27 Feb 2024 20:58:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eo6G1mRu" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5B29513AA36; Tue, 27 Feb 2024 20:58:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709067502; cv=none; b=ufIFS0W5tM29b7vudR6dcW/sNPena+V+DPO38H4lX3Y+PYjptyq1d1ddHOlj9ONzOY+5qGasDNy5/Dcnv8A5a04SatxGHO4DTEYZYqBUKq8qsEzMu8+x7wsYN91/VtSprJZU0MJjyaRScuDCy8lBa5u1sLj7C8ijjivJqGKHzUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709067502; c=relaxed/simple; bh=S4m9bTr9zzQmMMFY2/OXtF3VQx5pxQRtlH/CRZM8IfM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=BiNoe5K/lMudptGYflSMDjtAjqAA5N7QHiNzJ6EF40GpwvJbldM3LzUXyBUgxyYj8+4iuogrG9zhQdL4btq+KEeLqHWdE1BkhJ4yPGgoIBIZHD2xxYMYwBvJL/KNN4wUE2D0ZzuAR+Ka5f2LH/EFwmnMpD5ptIXbU8bvHQ0Pvks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eo6G1mRu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADEBAC43390; Tue, 27 Feb 2024 20:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709067502; bh=S4m9bTr9zzQmMMFY2/OXtF3VQx5pxQRtlH/CRZM8IfM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=eo6G1mRufXusc5lBh8VM/I4kP7svGiyBEr5GcRHlW2rjy8FQ6LMKLVCmTbh5uUzK7 /4wqI2mIBHYcUUZQjAwFoZvHuy/ey/pSoFbG5wUffKiJXrp1l8NWFz4wlZq+IfcDZT dfbMxAuBzypEcrjbDjDbjYrjhZ53lXcTchOKNeh8FSWjfgX6PAqyA92l64dGlyG2m9 3DKoCefKda353PzsCgR1KZYec9AoA5zN9HXoCtcA2+n0hoGVNtehajnKdNu0VtxE9O yhQXUFqPbtfuuRWgF2ql2N4iQHHM82e3MCiyW5UwCTvYGojZ1Tb2Wer35+iBh05+dA achG7ZtD0zjnw== From: Kalle Valo To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, Nishanth Menon , Breno Leitao , Li Zetao , linux-wireless@vger.kernel.org Subject: Re: [PATCH] wlcore: sdio: warn only once for wl12xx_sdio_raw_{read,write}() failures References: <20240227002059.379267-1-javierm@redhat.com> Date: Tue, 27 Feb 2024 22:58:18 +0200 In-Reply-To: <20240227002059.379267-1-javierm@redhat.com> (Javier Martinez Canillas's message of "Tue, 27 Feb 2024 01:20:46 +0100") Message-ID: <8734tdaal1.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Javier Martinez Canillas writes: > Report these failures only once, instead of keep logging the warnings for > the same condition every time that a SDIO read or write is attempted. This > behaviour is spammy and unnecessarily pollutes the kernel log buffer. Removing error messages is not usually a good idea, it would be much better to fix the root cause. > For example, on an AM625 BeaglePlay board where accessing a SDIO WiFi chip > fails with an -110 error: > > $ dmesg | grep "sdio write\|read failed (-110)" | wc -l > 39 -110 is -ETIMEDOUT. Why is it timing out? > Signed-off-by: Javier Martinez Canillas > --- > > drivers/net/wireless/ti/wlcore/sdio.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c > index eb5482ed76ae..47ecf33a0fbe 100644 > --- a/drivers/net/wireless/ti/wlcore/sdio.c > +++ b/drivers/net/wireless/ti/wlcore/sdio.c > @@ -75,8 +75,8 @@ static int __must_check wl12xx_sdio_raw_read(struct device *child, int addr, > > sdio_release_host(func); > > - if (WARN_ON(ret)) > - dev_err(child->parent, "sdio read failed (%d)\n", ret); > + if (WARN_ON_ONCE(ret)) > + dev_err_once(child->parent, "sdio read failed (%d)\n", ret); WARN_ON() feels excessive here, maybe remove that entirely? But dev_err_ratelimited() feels more approriate than printing the error just once. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches