Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1009413lqp; Fri, 22 Mar 2024 02:49:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUno7nTQuuuUg8urlRbX4A0x56Rv48Jst2WW8qcbXAk+tbCpfcUgDJ1yhNK/kRkE2VaU+1o9DniQ7otg22tfX9cABLBcqxOWUwpHdGVpA== X-Google-Smtp-Source: AGHT+IEKlWRrkZsSGRTkrajq/eU0DQ80DFpO6sIWILPjmj1FjplktNYpU2nFuGpvm4oSeNYYTk1y X-Received: by 2002:a05:6214:b6e:b0:691:3e27:5998 with SMTP id ey14-20020a0562140b6e00b006913e275998mr1949578qvb.5.1711100958568; Fri, 22 Mar 2024 02:49:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711100958; cv=pass; d=google.com; s=arc-20160816; b=QpIjMf5lYvkVpGEa6rt3ACEownJmCUeabanR48Xs/gDUg9okrmZr+zWhD6SQ3la1T+ tMoVjorvVWIJI8LpenSBiKUM8ieKIPDrp+5lQ1fswXqrz5FthDqwAOfZtoQ8XGOeXizw mzoQFhO9TQS6TZfRKX8moPIYrXoM1IZ8AmuRpO69XdFflGsXjK4t2iZqNrJ5N0s/pLB7 0C41JwDkqO4pGHHqysMARHjWwLOKR/VPQnRkeDbHDv9c8P/S0mNPCDc2Vdm+JNJH/6Ot fRIsjEOmtjdeQp3zKU+0n8rCP8OUng81zAGKsbIhY6m6g/y0o4NPCDWTyB0/4d0C7c30 0wpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=OlyKmVAM9JPjHrufp3e5q/L+KTLy7DGFZswN+A6oKno=; fh=IGcRZbKhi13izL7nDV/B5gH9DUYAe5+a1MvjN8ClLhA=; b=SXuYkAdf9hrDZ8SXlpxctDweSHR25em6kfg8FbltksSuhq+foeSAAidx+ZPvLwcOIp I0JbdV01ve0edYQqAKeFozufiShk5cYtbm2At2Dai0dYVCPA4tpQ64H2ee1fm4ELyk/8 zazPcR04X9LZFuBxh0qCjhhAmI1R957Ck5opmeWmEtE2U0dr42hIXmcjQ144By1SpRaP 2PrD+NQ2HHinMwA0tT8QyKSKcelw5f7ax83RWDoiktJUvEBmsegEZyjvQZPtF4QaeACV WKD6OTzr7p2QExIaOw09Q8XH4oclJnH5O3hG3ipB3cJqz5PNDi2Sa3Ckx2En9wArzzdv 2hlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VJpnvdDE; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-111247-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111247-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 8-20020a05621420c800b00695e33f6afbsi1832031qve.88.2024.03.22.02.49.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 02:49:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111247-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VJpnvdDE; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-111247-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111247-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4A0151C22859 for ; Fri, 22 Mar 2024 09:49:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D42632230F; Fri, 22 Mar 2024 09:49:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="VJpnvdDE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFC6618EC3; Fri, 22 Mar 2024 09:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711100950; cv=none; b=TjhHIjzopgKjqOE+4QjsbPLrbhrz00T4HQ8SWRO2IJ2x94LWptaYfahf0+wdC4dxOmNHV71HuRQbcucPpoFpFcnsrtPio22qxaAFPahmwgwA6yYHAG2ZXjV/TQRQhRCSJyXnSeDcKKTcpw9VWb5NDNR76uatBkeZw802m7h98K0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711100950; c=relaxed/simple; bh=9fLC0UbZdJ7+5nONUsPmxWgSbpgOb5S6dM9hszw1wxA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lhhMboSDSvh/v1mROecnrnHOyZp9Y+RGKdn2g8kafkIJrycx7fxQc6oSg+Cj7r3NlnMKKu/Ocj2+HehCtH6PJmVl7GzQxH9vYdCosyhglfhoGMsPNTFNDsxSoWuDGnetGAM4vSRfZzr1IaX7ykbDIW/QpqE0GFteIhEpxa8jbkg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VJpnvdDE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01BBEC433C7; Fri, 22 Mar 2024 09:49:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1711100949; bh=9fLC0UbZdJ7+5nONUsPmxWgSbpgOb5S6dM9hszw1wxA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VJpnvdDEgtMMh0T6kGcfh3PvHzDakRg2TCrWiiPp5XLkYWDDFauCeS1TPlDWAE5ps 2pv0bd7pgEopMAhK/RpzMjASXTcdkefQu1wSuFdtngGkTHjF+DR5gWeiz1R0IMA16f 9FOja5Egz+5SiqvP+nAnjuKaUIaXfs0x3WaG4coQ= Date: Fri, 22 Mar 2024 10:49:06 +0100 From: Greg KH To: Chandra Pratap Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev Subject: Re: [PATCH v2] staging: sm750fb: Replace comparisons with NULL and 0 Message-ID: <2024032208-blunt-ferocity-22f4@gregkh> References: <20240320180943.3683-1-chandrapratap3519@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240320180943.3683-1-chandrapratap3519@gmail.com> On Wed, Mar 20, 2024 at 11:39:43PM +0530, Chandra Pratap wrote: > Replace '(opt != NULL)' with '(opt)' and '(*opt != 0)' > with '(*opt != '\0')' to adhere to the coding standards. > > Signed-off-by: Chandra Pratap > --- > Changes in v2: > - Update the commit message to reflect the changes better > - replace (*opt) with (*opt != '\0') > > drivers/staging/sm750fb/sm750.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c > index 04c1b32a22c5..0391235c5666 100644 > --- a/drivers/staging/sm750fb/sm750.c > +++ b/drivers/staging/sm750fb/sm750.c > @@ -926,7 +926,7 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src) > goto NO_PARAM; > } > > - while ((opt = strsep(&src, ":")) != NULL && *opt != 0) { > + while ((opt = strsep(&src, ":")) && *opt != '\0') { Why 2 spaces? Please fix in a new version. thanks, greg k-h