Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4804397pxu; Tue, 22 Dec 2020 00:55:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzm8afGOkFZ/RS63FEM5vDX5B/CWAjz2kLCkSX97ExZZQQfDVxD3HFlH39xFzUei1onuoaf X-Received: by 2002:a17:906:a857:: with SMTP id dx23mr19007780ejb.189.1608627341619; Tue, 22 Dec 2020 00:55:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608627341; cv=none; d=google.com; s=arc-20160816; b=p3BlPyKYzkaxbci+HVrlDRLnNQ8qbOPZZBLfpLDEZIgTbe1MpnJxgSoZ6N9yWsJ12K mZc73kbEw3YCE8ZYzkJlwMJStUPSShc1YCg1g9GKvkUEbFwDpTQicntyv8ZMwkm1Werf KJFaDWPf9pMeDscfy+JbO7sozD1ylldXit5dCp9bfzYmwveI+xLhpKbokuX1JVqAb6ow FYR0D5X51mmO6yJLi1SPAQlRH6CpLSpxSrHmxlMDe0XA6p6icpV+nQ3pxGFwTn+JoQVw NDVp9r88FdHbohZTl6QoGSZGa54V7BYqOdwuZNUlZyES/Xcx3QToVBX4wrjxoZ89STIA rekw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KtTEXkqiRIMW65VN1Hj+EQXaABK/NHkK+Csmi4Ol5sw=; b=XKYoqSEGc6H2mh7wgum+UAYg+daRWIQxo84tZzp6SxwzsAne5yB+fYR5SlEv9fCkgU rxMMe6nIcDRBm5yoHo1d5V6thnwW+xvNaGVzWgjDj5OH5nxcrZMyNT5i4bPMbytzmmRg 8qpiZaRMm8z/jW9C9b2rW0w3abOiLgfzgypBcvKnBFX6OBfiGbhuyjZnYsItssU1rt+Z 0V3jxz0VeYTXMGwBGH1xRjk3/e8nFSXe8r29s/ckyrtWGY8uIAnoEXp79/3pnUpYBpBZ zF342SRLwk0gcZvUfmGoANwmm4tkI+wj1cW831jUvUQLMo4p3J/iUHUCVI76uN5CWtxk w2lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fWVgcy1q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si10249390ejv.36.2020.12.22.00.55.19; Tue, 22 Dec 2020 00:55:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fWVgcy1q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726044AbgLVIw6 (ORCPT + 99 others); Tue, 22 Dec 2020 03:52:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:47938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725852AbgLVIw6 (ORCPT ); Tue, 22 Dec 2020 03:52:58 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 096D12076B; Tue, 22 Dec 2020 08:52:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1608627137; bh=Eo+/3GxxfJoxqtCpQmtzecCT5vtIMi9pqnp1mADEaFk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fWVgcy1q4NXpS011cArBaBgZn83QLKdduVZWlB0Lm19qdQ/tbjWWb3zmc+1/KnpP4 eqlVFypcPIBj7NJdVHeQdIBFjcqrr8Obn7NUDeRDL9GObT76Ij51JiDztS8HL4O7YJ kjSkMcM+zrmftcYM6c8234G8YFnysDxMegtMO2D4= Date: Tue, 22 Dec 2020 09:52:14 +0100 From: Greg KH To: trix@redhat.com Cc: b-liu@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: musb: add printf attribute to log function Message-ID: References: <20201221162547.3756889-1-trix@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201221162547.3756889-1-trix@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 21, 2020 at 08:25:47AM -0800, trix@redhat.com wrote: > From: Tom Rix > > Attributing the function allows the compiler to more thoroughly > check the use of the function with -Wformat and similar flags. > > Signed-off-by: Tom Rix > --- > drivers/usb/musb/musb_debug.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/musb/musb_debug.h b/drivers/usb/musb/musb_debug.h > index e5b3506c7b3f..dfc0d02695fa 100644 > --- a/drivers/usb/musb/musb_debug.h > +++ b/drivers/usb/musb/musb_debug.h > @@ -17,6 +17,7 @@ > #define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args) > #define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args) > > +__printf(2, 3) > void musb_dbg(struct musb *musb, const char *fmt, ...); While I understand the need for this, did this find any problems? If not, then it's not worth adding, the driver-specific debugging macros should be removed entirely and just use dev_dbg() and friends instead. thanks, greg k-h