Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6008506ybv; Tue, 18 Feb 2020 08:08:02 -0800 (PST) X-Google-Smtp-Source: APXvYqy5BgOaicRYTd2K03AZcGFv0GO8r7StXPCocSDFAlgpDaiPL0YKPNoDsOg3Sa97NbgO5Ah3 X-Received: by 2002:a9d:3b84:: with SMTP id k4mr3402169otc.18.1582042082254; Tue, 18 Feb 2020 08:08:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582042082; cv=none; d=google.com; s=arc-20160816; b=T6p6ZSIJCS6vR77BNzkryqwYQOXzEEmhhPqXP1DLPSBhXV7Qt7ZneXWcqjMUrBZ+IN uKl+ccljgc09ynOBIgs4kebqklWRt06sxUB99Nx5MJ+1pZbCeTts/rGRMIxxakMGFOrZ wJ1MF9mMKHIHloYV6xOhIjpi9zmYztqs3ldynkgaeWoUtdS280rK/LlvjjO9Y0lhKnkh E9nE467sfybvCA/ZSO80ARKi+AGP7Zz4QhzwLaGnhIOaDvKoMMTtHhqYTKacnnCC8EeH v4qfmabLsWGYA86HB/ITPsTlESVVQaQpXnAoUFy9DU1o/oGSiH/ytOmsDsUQxSC1N0BI BVgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=6IJPCaTEcBb2m8XkY4aRmJfNArzRhDFzGrCWNLyN7Ic=; b=VGZ+M+ldVZSUfdL3pejESWiaKEN6yWIHrTIGial/udN9/chmfkPGYPc/Sdg74/WjWv Sv5JrNMHpUbfuG6GnZ0R/zZ6/Xd9pmnV3jv3Jwisqgevi+XdN1kP7i20KuHfeedUWDTX MgeZDAhu/jJK0vVn9PEfbex4Z/pDn5RP7YmGdRLIHe6w50c2yrXO9t91YVqSYxETzdNF MlN0RxRpg9nTLAz2yQLMlMjpR6Lk/r4HcP5ExdjaYdGy43zf2W5/JHe87Sde6Eh+Mdl6 E6PZBCJ9OwABfEdBnmkkHhP9v4hePU7g9k8RpJ9j3hJS4rW+8UEz1PBPwQurZ9oj+MHW cEug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.s=20150623 header.b=nNQYMPFN; 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 a12si7653893oie.87.2020.02.18.08.07.43; Tue, 18 Feb 2020 08:08:02 -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=nNQYMPFN; 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 S1726556AbgBRQHj (ORCPT + 99 others); Tue, 18 Feb 2020 11:07:39 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:36484 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726360AbgBRQHi (ORCPT ); Tue, 18 Feb 2020 11:07:38 -0500 Received: by mail-pj1-f67.google.com with SMTP id gv17so1193524pjb.1 for ; Tue, 18 Feb 2020 08:07:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=6IJPCaTEcBb2m8XkY4aRmJfNArzRhDFzGrCWNLyN7Ic=; b=nNQYMPFNJpNoZxtqF2phDv1wjXg0AOZ/bl4BaeHLoULkitFcLFvO3rs4v3tmN7E108 tDWdJm31m3moyA169gHYrLc/puw5pYrowXS7G6CHHU23HSnEuG4+oX57a7ItNS9dBthQ FH63MQBYEqz4zkoxEXkPInytkpJrdBCRH6oERlUbX3RvNVqi+F8nI39WXY1X2aJjPcJK o0qLDJNkEtjRUJD3cwrd2M6y0rzsIRMkuBPaWdfRLaWiPyJgky/uEhnouXIPZWJsihld F1Gim6pg0v5ed3RKxw86kVFL0I9AHP/84LExdk5/9NVFpulFphpKCcEYKx8Z+lp7wxpS 0wug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=6IJPCaTEcBb2m8XkY4aRmJfNArzRhDFzGrCWNLyN7Ic=; b=C4xhYWVMwZ3Clz7igP3aSRyKWFwT899wNjF4JPbEeFCr+Nv1AGlGX724FaTo6sNRUE RMEijJYvVDDLWecPSj7LXoV7SeqjVeS4U5PyRx96v69DZ8CUyFFrii9SW78Bkm17TPvX VPYEzBz7fSOJPfzY+RmGc4UXbhUlGEYECgU2htTGP5rreLSlWYbZnI3vXeXKc7c6mA4G V4pnvl5qSOhQt1eBXwitLlC/ygdNLSGc8SnS+6N3VK1KA/WHJM2ihY8X5rfpVXqB/8Cl T09Xe4XmpjeX7AXNQXeodsnByZ6yEHU/Lo6LzclJTokZpjvs25U2k9vWCofvM86+fNQl eWcg== X-Gm-Message-State: APjAAAUkruV9uvUMPfA2iHVHV7VbjH/+rzgDtpKs2HL6Q78lP7/7D9VP m3jvp8rhFrIZNyjNshF99KSQjQ== X-Received: by 2002:a17:902:b583:: with SMTP id a3mr21124343pls.180.1582042056382; Tue, 18 Feb 2020 08:07:36 -0800 (PST) Received: from kaaira-HP-Pavilion-Notebook ([103.37.201.176]) by smtp.gmail.com with ESMTPSA id g9sm4773300pfm.150.2020.02.18.08.07.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Feb 2020 08:07:35 -0800 (PST) Date: Tue, 18 Feb 2020 21:37:28 +0530 From: Kaaira Gupta To: 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: <20200218160727.GA17010@kaaira-HP-Pavilion-Notebook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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); return 0; } @@ -995,9 +1003,17 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, "Now %dx%d format %08X\n", f->fmt.pix.width, f->fmt.pix.height, f->fmt.pix.pixelformat); - - 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); return 0; } diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h index b5fce38de038..2e3e1954e3ce 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h @@ -121,16 +121,6 @@ int set_framerate_params(struct bm2835_mmal_dev *dev); /* Debug helpers */ -#define v4l2_dump_pix_format(level, debug, dev, pix_fmt, desc) \ -{ \ - v4l2_dbg(level, debug, dev, \ -"%s: w %u h %u field %u pfmt 0x%x bpl %u sz_img %u colorspace 0x%x priv %u\n", \ - desc, \ - (pix_fmt)->width, (pix_fmt)->height, (pix_fmt)->field, \ - (pix_fmt)->pixelformat, (pix_fmt)->bytesperline, \ - (pix_fmt)->sizeimage, (pix_fmt)->colorspace, (pix_fmt)->priv); \ -} - #define v4l2_dump_win_format(level, debug, dev, win_fmt, desc) \ { \ v4l2_dbg(level, debug, dev, \ -- 2.17.1