Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6172688ybv; Tue, 18 Feb 2020 11:19:35 -0800 (PST) X-Google-Smtp-Source: APXvYqweNu0+a8V2gFuac0+6TPCkrvRwJlewovlBgNNtD+Pg6Go6jinOth+6cFUzEmE0XHea4/KX X-Received: by 2002:aca:1c09:: with SMTP id c9mr2318492oic.85.1582053575680; Tue, 18 Feb 2020 11:19:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582053575; cv=none; d=google.com; s=arc-20160816; b=hXNDwO5HalFxS32lYcJRmd9WymyZTPLspRD3C8U/DVsQrFxzZHTUIPD2tuAr1I9h9H SZyCEz3EPqG5PdBibwLJjyasar5m3cTK4ed12rTJNdHa6qV5iDSZGpFv3Wc6lSMYCc+Q WvWRE8OlCm7q9QLWB3fZZbXvpvhzGLDklAKtuqH2R758yYLJPKYXzevTJlpSnciFKOXu f/3LJdq3M2yoAK0uKKxC6o5YLHVTPoS8Uh1AOf9hc6Nt8a2Jpesxxjo3lzZws1/NKl7W 44YL1Lux3no2EvLjtSl37tMD00+F6uxA9y8w0Ht70Vd/D5xSCqD19ZaT6i3nLsIJIVrv G5KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=hdis5Be2VylUOrCt10Cz6Yqnuk5YbPer1SATYKuRYm8=; b=emXWG+H7a9zwRl0qYSfi1byYZkjp0ruNfG2IHNLQpbNNUsClXCzYGZRlcaBYByjo42 3LLUVbXbTXL0a0hD4lJf+4EV6r7/zRaPBildXfNC+0PipQWyuB08e58OkbOuRspVOH+T r5UoglHR9dCvlfA6rd/0t5e0Ny8fVPaybZEaRL/ITdDDzO8ulSMfxhwK3wBmbVOxlb2c 88U86xozTveKV2J+Uam9orJQrQHVGlpwTE0hOZbjEh3s/uEm6mgGUBljSmV1FqmNDiyg 2iqrnNktbhjcWTUITze/2Vi4hhF+04oBRgZbYu0dxS8YqgYMsJSK+b9lA4TM9fRX5jwU F1vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.s=20150623 header.b=d3gbxN0E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iitr.ac.in Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18si2335421otk.227.2020.02.18.11.19.23; Tue, 18 Feb 2020 11:19:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.s=20150623 header.b=d3gbxN0E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iitr.ac.in Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726427AbgBRTSE (ORCPT + 99 others); Tue, 18 Feb 2020 14:18:04 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43419 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726318AbgBRTSD (ORCPT ); Tue, 18 Feb 2020 14:18:03 -0500 Received: by mail-pg1-f195.google.com with SMTP id u12so11053140pgb.10 for ; Tue, 18 Feb 2020 11:17:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hdis5Be2VylUOrCt10Cz6Yqnuk5YbPer1SATYKuRYm8=; b=d3gbxN0Eb1BCaa9gLyAoMPLm5uMOU4lHLgDMa8jfpH75ogLpXd95m95AIF0mTusmEH MUeKNqN0pYIwbAenzEdd6QpZDEC3FdYztj5vWXSffv/HT+hONr42+wiXCyRKuFNj1apz n1LZFAkPvnE/YliBP06K+CKh6vpG8IpwT9/g3jh7gZqPhdmJRh3TxNCoygUucNGuzWMU b912pH7Dx43ouulUY7T/lbOSD+DiLBgyaO1gaPYf2pN8VNRYmL0dwodx8Rc4fiBCYnJ9 LS39tFVs1CRnOIgEToMois9djIZNuXBl5ptwoeDJX0ldqSpEPS5DeLhZj0mIua5gEtGN rCeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hdis5Be2VylUOrCt10Cz6Yqnuk5YbPer1SATYKuRYm8=; b=fAujNfaeFOEcle4yFNeLbqbZAITLh/Ns2OTKkMRwMWO0iTvXsRSpKvDDVzM0jgVauJ wvyn3qAkchpNraijYMGyHLdS4mxa2KmdFfhSO/o4hu1IcfwdpYe5KwzLJN57WfrP/dkk 0RO5pVS4d1PQ9hVZycA6hxFSo2Q4JNEcGcRypg7DVhUuWZjvHLYtpDVDv/4c3/UhfeKA 9n61gSrZ3JA/wUND73sfhglwKKdakH+vfh8YO1VrjpFBYui+OYhEJsOc/GyYp2NHsMVL juGY4Rv7RyT2rGqtjPSORw2XZivLdZvx2wRszUoWVHZSdMdViLHXDSpRK4hbmPVzmnyC fd0A== X-Gm-Message-State: APjAAAUlNdxfLzd/b/QWOkXjltIOkCS3Tc//mtuzVKP77EJmpggJe7Qx pxKmVHRtnVg9iQLmiUoI8SlB59fUeo/TN1EX X-Received: by 2002:a63:d18:: with SMTP id c24mr24447947pgl.218.1582053478100; Tue, 18 Feb 2020 11:17:58 -0800 (PST) Received: from kaaira-HP-Pavilion-Notebook ([103.37.201.173]) by smtp.gmail.com with ESMTPSA id a35sm5769697pgl.20.2020.02.18.11.17.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Feb 2020 11:17:57 -0800 (PST) From: Kaaira Gupta X-Google-Original-From: Kaaira Gupta Date: Wed, 19 Feb 2020 00:47:47 +0530 To: Dan Carpenter Cc: Nicolas Saenz Julienne , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: bcm2835-camera: call function instead of macro Message-ID: <20200218191747.GA12782@kaaira-HP-Pavilion-Notebook> References: <20200218160727.GA17010@kaaira-HP-Pavilion-Notebook> <20200218183711.GE19641@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200218183711.GE19641@kadam> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 18, 2020 at 09:37:11PM +0300, Dan Carpenter wrote: > On Tue, Feb 18, 2020 at 09:37:28PM +0530, Kaaira Gupta wrote: > > Fix checkpatch.pl warning of 'macro argument reuse' in bcm2835-camera.h > > by removing the macro and calling the function, written in macro in > > bcm2835-camera.h, directly in bcm2835-camera.c > > > > Signed-off-by: Kaaira Gupta > > --- > > .../bcm2835-camera/bcm2835-camera.c | 28 +++++++++++++++---- > > .../bcm2835-camera/bcm2835-camera.h | 10 ------- > > 2 files changed, 22 insertions(+), 16 deletions(-) > > > > diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c > > index 1ef31a984741..19b3ba80d0e7 100644 > > --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c > > +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c > > @@ -919,9 +919,17 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv, > > else > > f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; > > f->fmt.pix.priv = 0; > > - > > - v4l2_dump_pix_format(1, bcm2835_v4l2_debug, &dev->v4l2_dev, &f->fmt.pix, > > - __func__); > > + v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, > > + "%s: w %u h %u field %u pfmt 0x%x bpl %u sz_img %u colorspace 0x%x priv %u\n", > > + __func__, > > + (&f->fmt.pix)->width, > > + (&f->fmt.pix)->height, > > + (&f->fmt.pix)->field, > > + (&f->fmt.pix)->pixelformat, > > + (&f->fmt.pix)->bytesperline, > > + (&f->fmt.pix)->sizeimage, > > + (&f->fmt.pix)->colorspace, > > + (&f->fmt.pix)->priv); > > This is not as nice to look at as the original. Just ignore the > warning. > > regards, > dan carpenter > So, is this warning to be ignored from everywhere in every driver, as it doesn't look good? And if yes, then why is it there in the first place? Thanks!