Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5259336pxj; Wed, 26 May 2021 06:37:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIEoIZJSkqek47X6MlE4RG1C41fXxlLl/jlWjS0OB6lNuWvKJ2cTCD7OmNpQfg/nAKDIED X-Received: by 2002:a05:6638:10f:: with SMTP id x15mr3258695jao.119.1622036268199; Wed, 26 May 2021 06:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622036268; cv=none; d=google.com; s=arc-20160816; b=V9JHZFFY5a9uOhILzyXSHWQ6GIZ9mJ5JE96vG5auL5DFlEgxSyq7FmfUcZhOFHLaEE a4IdBaVIzWgdzPVk6rG7Yy7O8NAdK93/YCHwEqQJ4ibQzAo23Ac4/5Hiu/J1KmTGMRB2 PufFAhKAhhWWvTDLSkmCRy2Gx1qJObe1w8iSh8KR9jKYtez2viDZr0EwuPgGsdntL/4b aLK9lz10dlDX8hLzaHpetM/OdKxo/i+VRcLcU6zhjPfalcHfmMuosEQkLKh3UbOHBKOx 9Bo98tWOkQP7jDFyfGpLymOuRdQhIcZL3Jh6lFX4nL8iA2wy9Nuuyz6Hva+qwdJkbat4 STCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=EI3B+LNMCYgFK30T4XcTo3CVB8C276/abB7V41iMB3k=; b=fLUk4qUXdkasoNjImQmBk2+AEYmRbHqXHHTU6KQTjuK+8ZMwDeuGxmRpjKoPiK63y+ E07xDEChYvyRFEVHCMWa3+6eHGXkvQlmal23Q2jtu7LHEdtVu0v5GSitBAiXbvQBS+JG a7fbtfVx/rPHUo3Op/rkU9WpcvwwdN3m+zG0sCifLvBto7rdLgZYUEO8S/OvuBWMWhV6 uZFO6GCcLOJKUmvuFjWJn9/Bfk4Ez4++plHxecH7V5W0+IpFPFkw+lO41hfQ94vGcDZx WAS9zAqIrFkDdvZPbgh+TU459LDM3meuJqgL3ayQdnXyvp7b8pm1xA/amTIFkunEayV5 XYWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=sO2Ifvdx; 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 u13si20814812jak.126.2021.05.26.06.37.34; Wed, 26 May 2021 06:37:48 -0700 (PDT) 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=@xs4all.nl header.s=s2 header.b=sO2Ifvdx; 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 S232716AbhEZNRM (ORCPT + 99 others); Wed, 26 May 2021 09:17:12 -0400 Received: from lb1-smtp-cloud8.xs4all.net ([194.109.24.21]:33309 "EHLO lb1-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232211AbhEZNRK (ORCPT ); Wed, 26 May 2021 09:17:10 -0400 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id ltNmlTk1ZWkKbltNplDI5H; Wed, 26 May 2021 15:15:37 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1622034937; bh=EI3B+LNMCYgFK30T4XcTo3CVB8C276/abB7V41iMB3k=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=sO2IfvdxyOjAvsIVwHy0zaAXAIh8Met5e24EntS5BTrlvuOOA8vb3dS45qvlsU3lp JKtaHml5WpDfM40VwPD5WficCqfcCAvrC2hzkPZyoxok3I+ihytK+2h5wC1z3HeYqX Z3dCA8kP255ta6XDYcECVY6IyFyTV30INFOLGTa+EIjFBWRXoEc1lTc/ZwYTdWvFgz FQJ9hUOYCKRsybmXYyle6uLiSdD+C9UMdB4JPgVRo2l3mq0/Wbjoq2KdqNe/sm4MRf OzRtrkv0LGpjGaLl3ES+liMuN8m271bVw15iBG83Hpc/Uy8HeTv0LSWNXDyXxBNpr1 TgjWVyoukoDeA== Subject: Re: [PATCH 4/4] media: usb: cpia2: Fixed coding style issues To: Piyush Thange , mchehab@kernel.org, leon@kernel.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210430154314.3152-1-pthange19@gmail.com> <20210430154314.3152-4-pthange19@gmail.com> From: Hans Verkuil Message-ID: <7a3e11b0-272c-bef0-2256-ddd54797bfbf@xs4all.nl> Date: Wed, 26 May 2021 15:15:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210430154314.3152-4-pthange19@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfKrFY56gBYdLpAzdDDdZJTAMbTi/4MEO/2ii+2hvw+mAyuRKyfL2C3yVWSPY5Od42o6dJGrbKYBsHZD7oQYXyXkLsEHnMyTA1gQoSTG7GkAqDidhkEnz dRHI+zSoT8hsCyHV0Mp/VYU3RQVUUSDAbbD6mTcV2DxjDt9WpKYWMZjrRR64E6ly65DwaIcY9D9g0K063TnVQRychTLq5fSqnp5Z4h/dxhYxW2+7xQbHpPb5 ROQ2k9P8lDuFMwiFKTSzUV/waXEqLbOyEI1xo2Y8C+S+fv+z07ucwOHxyumMdd/58f8EAe2fvEaRmaH5bdppSZytdOk4iDxzYKlDpsqHv5g= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/04/2021 17:43, Piyush Thange wrote: > Addition of more fixes on coding style. > > Signed-off-by: Piyush Thange > --- > drivers/media/usb/cpia2/cpia2_v4l.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/drivers/media/usb/cpia2/cpia2_v4l.c b/drivers/media/usb/cpia2/cpia2_v4l.c > index 261ced144793..d950f9171208 100644 > --- a/drivers/media/usb/cpia2/cpia2_v4l.c > +++ b/drivers/media/usb/cpia2/cpia2_v4l.c > @@ -883,12 +883,12 @@ static int cpia2_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf) > > frame = find_earliest_filled_buffer(cam); > > - if(frame < 0 && file->f_flags&O_NONBLOCK) > + if (frame < 0 && file->f_flags&O_NONBLOCK) Add spaces around & as well. There is no need to split this up into four patches. Just post a single patch for all these changes. > return -EAGAIN; > > - if(frame < 0) { > + if (frame < 0) { > /* Wait for a frame to become available */ > - struct framebuf *cb=cam->curbuff; > + struct framebuf *cb = cam->curbuff; > mutex_unlock(&cam->v4l2_lock); > wait_event_interruptible(cam->wq_stream, > !video_is_registered(&cam->vdev) || > @@ -970,7 +970,7 @@ static int cpia2_mmap(struct file *file, struct vm_area_struct *area) > return -ERESTARTSYS; > retval = cpia2_remap_buffer(cam, area); > > - if(!retval) > + if (!retval) > cam->stream_fh = file->private_data; > mutex_unlock(&cam->v4l2_lock); > return retval; > @@ -1160,10 +1160,10 @@ void cpia2_unregister_camera(struct camera_data *cam) > *****************************************************************************/ > static void __init check_parameters(void) > { > - if(buffer_size < PAGE_SIZE) { > + if (buffer_size < PAGE_SIZE) { > buffer_size = PAGE_SIZE; > LOG("buffer_size too small, setting to %d\n", buffer_size); > - } else if(buffer_size > 1024*1024) { > + } else if (buffer_size > 1024*1024) { Add spaces around * as well. checkpatch.pl --strict warns about that! Regards, Hans > /* arbitrary upper limiit */ > buffer_size = 1024*1024; > LOG("buffer_size ridiculously large, setting to %d\n", > @@ -1173,15 +1173,15 @@ static void __init check_parameters(void) > buffer_size &= ~(PAGE_SIZE-1); > } > > - if(num_buffers < 1) { > + if (num_buffers < 1) { > num_buffers = 1; > LOG("num_buffers too small, setting to %d\n", num_buffers); > - } else if(num_buffers > VIDEO_MAX_FRAME) { > + } else if (num_buffers > VIDEO_MAX_FRAME) { > num_buffers = VIDEO_MAX_FRAME; > LOG("num_buffers too large, setting to %d\n", num_buffers); > } > > - if(alternate < USBIF_ISO_1 || alternate > USBIF_ISO_6) { > + if (alternate < USBIF_ISO_1 || alternate > USBIF_ISO_6) { > alternate = DEFAULT_ALT; > LOG("alternate specified is invalid, using %d\n", alternate); > } >