Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2367499pxf; Sat, 13 Mar 2021 18:20:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRlzzrq/zGN8fGQEJnFbrnbC7ZwJ61CwIkr3SUd1rKikBboMoqrmStrC+2v+deh2iLzzeH X-Received: by 2002:a17:906:3f88:: with SMTP id b8mr5903666ejj.36.1615688440191; Sat, 13 Mar 2021 18:20:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615688440; cv=none; d=google.com; s=arc-20160816; b=sPDKGxThz+z65fO8IpYiNluiB607qI6GcG8bGnACFii0tX6FuH+hfBK+EMN3FjB3Fw jAAAgKmSiElWvhx10INbHEcSM0CZlCq+hxMZtikL9usQzBzDIMwAlBHGJeozstdg4Lii SE3BGWD68MOXHpOKJgvMwYmuLsFyB1vSdFivrN4uGa+kf/c0l9tp/lTjxlc/E0iCgEXL 4BpyaLsxhoL0BqzdEFUR4Uxh+kETCUdstPduNXbTR+Jqbgx51crALq11M4Xf1LALSC3l fInrI1bUSddNFnAU0PbbnJWHMY7VVjmXu7IZdkinSlZX17FM+qo4jNbE1R4W5K2UT2F6 8/BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0xwOIvbsthPqeFuygSZTMnOTAgx7DlsPjNElfeW6Dag=; b=EvZ9k+9M0xP4o8zWS4rp3zKklBaWBaau7UA9TeYTyj9mgPjvnK2f24qjfztecq5spH rStfSrAXS8qxAroFWuBRJTGgTKRPC5UbsJfwEjRymvH+WZhHc25t6+OJg5E3gFGoE5HP Gthw0hCvS8D+dxOQb5FQ32bxArB7ye3umpXW5+8bq8nE6fpI+iuecIvoP/kWHcwAdGAF otGKEffrN6xCy3bzBIx319qVgNlaJMTopbBQi0ZsH9ZQUO00xGx7f7jLhIn1u9HdBYFq 9kxMTua7lF0u+QNnI1ikY4kOTP6uSW5aJEGeK+GkWHqgoC2+LnntXZALQmd29uGqpboH Z/WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=pHZm8riY; 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 s23si7471792eja.266.2021.03.13.18.20.17; Sat, 13 Mar 2021 18:20:40 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=pHZm8riY; 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 S233248AbhCNCQX (ORCPT + 99 others); Sat, 13 Mar 2021 21:16:23 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:45190 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231597AbhCNCPv (ORCPT ); Sat, 13 Mar 2021 21:15:51 -0500 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0320E55C; Sun, 14 Mar 2021 03:15:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1615688150; bh=DKsxYktuuGnusRXJGBQqTLHN0r6C6x8dBcI2xv+gbos=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pHZm8riY74l8W/JQpcFEYe4VWPBYb0NL+62WF/W5j5QFq89rRy2pRwspPS8FAKb4J IQIq1kOlo4eQUT43Px638X5Qa0Jdm+dh52yD7ZS3KFuhyJgn/di4uG+rlJvdAQkdYs DvJ/a2dxMDfmW9eIb3nDkaXc2UfSoII0crFFJNjo= Date: Sun, 14 Mar 2021 04:15:14 +0200 From: Laurent Pinchart To: angkery Cc: tomba@kernel.org, airlied@linux.ie, daniel@ffwll.ch, sebastian.reichel@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Junlin Yang Subject: Re: [PATCH] drm/omap: dsi: fix unsigned expression compared with zero Message-ID: References: <20210312071445.1721-1-angkery@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210312071445.1721-1-angkery@163.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Junlin, Thank you for the patch. On Fri, Mar 12, 2021 at 03:14:45PM +0800, angkery wrote: > From: Junlin Yang > > r is "u32" always >= 0,mipi_dsi_create_packet may return little than zero. > so r < 0 condition is never accessible. > > Fixes coccicheck warnings: > ./drivers/gpu/drm/omapdrm/dss/dsi.c:2155:5-6: > WARNING: Unsigned expression compared with zero: r < 0 > > Signed-off-by: Junlin Yang Reviewed-by: Laurent Pinchart Tomi, will you take this in your tree ? > --- > drivers/gpu/drm/omapdrm/dss/dsi.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c > index 8e11612..b31d750 100644 > --- a/drivers/gpu/drm/omapdrm/dss/dsi.c > +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c > @@ -2149,11 +2149,12 @@ static int dsi_vc_send_short(struct dsi_data *dsi, int vc, > const struct mipi_dsi_msg *msg) > { > struct mipi_dsi_packet pkt; > + int ret; > u32 r; > > - r = mipi_dsi_create_packet(&pkt, msg); > - if (r < 0) > - return r; > + ret = mipi_dsi_create_packet(&pkt, msg); > + if (ret < 0) > + return ret; > > WARN_ON(!dsi_bus_is_locked(dsi)); > -- Regards, Laurent Pinchart