Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2738904pxu; Mon, 14 Dec 2020 09:44:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJrwrtwVsr3JT+P/Ov8XUHsVp08G8wm+L8esh3GlfT2GftT2kwxhDW9l+SnLDsNcYgwfbO X-Received: by 2002:a05:6402:8cc:: with SMTP id d12mr25536722edz.0.1607967853161; Mon, 14 Dec 2020 09:44:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607967853; cv=none; d=google.com; s=arc-20160816; b=wnNSAZqfQSJbMWkvdJXsGOd8m3QdVTdrkjIdryc6x91Hsf7P+p/x/NolkKHdqQz65h E8ZH3gBltXuGLfOtbsu8bYavF1fOomxXXmRoYz7V3o2qn85wkJMWsjZ5/foJSc1mL/wX kr3upgROUcqpjc7ZBZJm1vp14OVmWqiOg8ALRqx6eUBSDqPSGmN8k23MZ6cbAf3ZgAg3 HuZgzKUbgGygj/2+VwKSeLBa9iw4nb/RcmJqjn5XWwcpYUQttBhOq22/0axXKQH8hU4W 4b+WR6Qo+Yxaw9OiaBl7vssXjarxbv1lqvRz/7LR3S3TKARi8RqLO8Wi/mz67MQQXJhZ 5e1w== 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 :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=1qjGgi8Q0RkwqoZ346Nnop7FElZ0mhVgsjAPUrNtRZk=; b=XQxTtcnEGS1HYaal6btx9K9+z7yUui3pY22Qo5SB9OosfAmbFkD0aAnpx0POd1u0Qx pM6GHnNiYYDWVju0JmL4u2e7W5a21WD1PgQ8ldSEMjGnnPq5v+ARBoQ/6+Jqq02Nlxsi 24RujD/IkQxuCVXL3DIyZUSqQBIeZvpN/pKvN4xvVPy2kLgk2lEDNAjEz5hbw/njsyAk CDY/+uxZ0tA5JpoUqGL/hkqcJ1Bo4SnzK2Zu6T8xaRT8cEH14fSy31dCqsbK+WHBak76 f+vLalbF5cHaVk7fmaxYU99iR53XheJR//j/92541Lxi52l1ekA7jSi1meTODvP3q+nL lR3g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx4si8892398edb.137.2020.12.14.09.43.47; Mon, 14 Dec 2020 09:44:13 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407771AbgLNLy4 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 14 Dec 2020 06:54:56 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:44073 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407754AbgLNLym (ORCPT ); Mon, 14 Dec 2020 06:54:42 -0500 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-57-NlvEctBAMaCvCybvQIbvtA-1; Mon, 14 Dec 2020 11:53:03 +0000 X-MC-Unique: NlvEctBAMaCvCybvQIbvtA-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 14 Dec 2020 11:53:04 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Mon, 14 Dec 2020 11:53:04 +0000 From: David Laight To: 'Philipp Gerlesberger' , "linux-kernel@vger.kernel.org" CC: "ij72uhux@stud.informatik.uni-erlangen.de" , "linux-media@vger.kernel.org" , "devel@driverdev.osuosl.org" , "linux-kernel@i4.cs.fau.de" , "gregkh@linuxfoundation.org" , "sakari.ailus@linux.intel.com" , "mchehab@kernel.org" Subject: RE: [PATCH v2 12/12] media: atomisp: Fix LOGICAL_CONTINUATIONS Thread-Topic: [PATCH v2 12/12] media: atomisp: Fix LOGICAL_CONTINUATIONS Thread-Index: AQHW0gocnJO7wsTYYEGwNcWFQ1O+9qn2emzA Date: Mon, 14 Dec 2020 11:53:04 +0000 Message-ID: <4eef67d66b0b48feba474906431daa30@AcuMS.aculab.com> References: <20201214110156.6152-1-Philipp.Gerlesberger@fau.de> <20201214110156.6152-13-Philipp.Gerlesberger@fau.de> In-Reply-To: <20201214110156.6152-13-Philipp.Gerlesberger@fau.de> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Philipp Gerlesberger > Sent: 14 December 2020 11:02 > > Logical continuations should be on the previous line > > Co-developed-by: Andrey Khlopkov > Signed-off-by: Andrey Khlopkov > Signed-off-by: Philipp Gerlesberger > --- > drivers/staging/media/atomisp/pci/runtime/queue/src/queue.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/media/atomisp/pci/runtime/queue/src/queue.c > b/drivers/staging/media/atomisp/pci/runtime/queue/src/queue.c > index 2f1c2df59f71..7d44070c7114 100644 > --- a/drivers/staging/media/atomisp/pci/runtime/queue/src/queue.c > +++ b/drivers/staging/media/atomisp/pci/runtime/queue/src/queue.c > @@ -24,8 +24,8 @@ > *****************************************************************************/ > int ia_css_queue_local_init(ia_css_queue_t *qhandle, ia_css_queue_local_t *desc) > { > - if (NULL == qhandle || NULL == desc > - || NULL == desc->cb_elems || NULL == desc->cb_desc) { > + if (NULL == qhandle || NULL == desc || > + NULL == desc->cb_elems || NULL == desc->cb_desc) { > /* Invalid parameters, return error*/ > return -EINVAL; Get rid of the obnoxious backwards tests and it probably fits in 80 columns. if (!qhandle || !desc || !desc->cb_elems || !desc->desc) { ... OTOH if it isn't expected that any of these might be NULL just delete the test. If they ever are 'accidentally' NULL it is usually easier to debug the NULL pointer dereference than an obscure error return. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)