Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp6561749pxu; Thu, 24 Dec 2020 05:52:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFcGq8pBpExA1/J+2NWYjNrZeGsXXbDJfzbfO4coskP7H+76WqER6jJGmE0cH8lgiYMXld X-Received: by 2002:a50:bb44:: with SMTP id y62mr28725489ede.103.1608817978284; Thu, 24 Dec 2020 05:52:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608817978; cv=none; d=google.com; s=arc-20160816; b=UAZKevcPgRPpAnLvZMpPkaIsdBD48af3G8Fg4HGpe7WsP1RjRqyDHmQqLLkK2/dzim dYAGxRa12Gk46SZkh+7KzSRSAQruBPgmXEl8jw/hSqIK/F4sW+Uqb5xh2pOTJrU1Uexv 5u2kemsrf1+dZ7hZor9gwO4dJXol6zS1+gjK+bbBSxKAxhOq/MRXUksCRhSAt+AS9RcT k8Mo33E0CZ1j6Tuy9ALtK+EfMYieiEIFX/Gs6mmHswPQpNsxgULsswUv6FTUbakmaJhV oYSSgMCl0/7o/95qXL9Cej0XXPrRB93BWhrZbre4Chsh5JRokAnhKStxmXBxJA+1r96y qS0A== 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=ZToqrfVxdyj769AMoVl4ZJm1FImUjRYMp/V9CbuDu1g=; b=TE3lY8VW/7rgwmUtUwWLslqJvhiQx5+4KRjPB8ASAQ94JFJQpUcB0n/R29EntwO+45 F875ZA6n+O9WwwN88pEST8om/fXztXCzwgB9slNPvFCu8butHaxzUf+8V+0NrFKyuVjx oG8b06CW5loocrCHYsaE6XSm2M5VDau2ZoWcki+x8yfvNPG+Qx/Kneu3kGX/sg4HY6XV Zkz7Yd3WWUS2FeqvTNF21FNy97lSvwaoJ+EIWFx6/4IxAxX0UwSgfgKcFHMjY4VgJzwT XDPHyGBIdJ0E7p8wSekrioxYUtVOJWvwnZWt6SG0t1+odJXL/Oi561am0NiaPEviAB1O WFjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=IwMgYFYL; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si14617653eds.509.2020.12.24.05.52.36; Thu, 24 Dec 2020 05:52:58 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=IwMgYFYL; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728235AbgLXNvW (ORCPT + 99 others); Thu, 24 Dec 2020 08:51:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726591AbgLXNvV (ORCPT ); Thu, 24 Dec 2020 08:51:21 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FADEC061794; Thu, 24 Dec 2020 05:50:41 -0800 (PST) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 015A7A1D; Thu, 24 Dec 2020 14:50:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1608817837; bh=IP/ZvkSmZQ0efnEqwjeW+tZECf17c54ebNNW8CBkRck=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IwMgYFYL6VHrvkgXDMhuQ3YHPVbAihS+8Y5Pye7vJD4pvootx/j2ot1d/27E64frb 7QGqLmveNV54hQSvgBkrVapBY+zsn9vu4rMuBIGHLKnwD72ZLBCrEJt4YBLK8J6Y3v WxxOTqYHUsRMsUx+4UXg+yDVNg6lWNFgQ4pKAEgM= Date: Thu, 24 Dec 2020 15:50:28 +0200 From: Laurent Pinchart To: Andy Shevchenko Cc: Ricardo Ribalda , Mauro Carvalho Chehab , Linux Media Mailing List , Linux Kernel Mailing List , Joe Perches Subject: Re: [PATCH v7 08/12] media: uvcvideo: Use dev_ printk aliases Message-ID: References: <20201223133528.55014-1-ribalda@chromium.org> <20201223133528.55014-9-ribalda@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On Thu, Dec 24, 2020 at 02:59:34PM +0200, Andy Shevchenko wrote: > On Wed, Dec 23, 2020 at 3:39 PM Ricardo Ribalda wrote: > > > > Replace all the uses of printk() and uvc_printk() with its > > equivalent dev_ alias macros. > > > Modify uvc_warn_once() macro to use dev_info instead printk(). > > ... > > > +#define uvc_warn_once(_dev, warn, fmt, ...) \ > > +do { \ > > + if (!test_and_set_bit(warn, &(_dev)->warnings)) \ > > + dev_info(&(_dev)->udev->dev, fmt, ##__VA_ARGS__); \ > > +} while (0) > > ... > > Why not to use dev_warn_once() instead? uvc_warn_once() prints the warning once per device, not once globally. -- Regards, Laurent Pinchart