Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3052938ima; Mon, 22 Oct 2018 22:44:39 -0700 (PDT) X-Google-Smtp-Source: AJdET5dqYsSSt5/7kmIJqIwmh1V1n9Y12llxFQkVAx695q9FnGq5mtHgrOMYcRuPei/VplJVXKgS X-Received: by 2002:a17:902:3fe4:: with SMTP id a91-v6mr8632375pld.295.1540273478979; Mon, 22 Oct 2018 22:44:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540273478; cv=none; d=google.com; s=arc-20160816; b=zXmEPlkuJQbV6DU1zDmIKL58UtiZ9eMmESvKmD8ygg/G1cZ53kDaRxwCGSznb1xVav t8zBIq/3ygKuNrDdyIr+BeLAzqTEzDZE/g9Q/fCXZfcfCuWJXXxSAo41T/zWfBV34MH6 fVoVZE6PGQ4hPlXa/BgVsNDIsUQJRDSxGZzoAwbvicMcSOW/Wl6AlYYT1c/exI6ojISM FMZ3P/9ES4y31LG1fznMEbwBFGBotTpUKJkurubYiaQ/ZYcarwlDK2SjAsEyX1C5NafJ nWJiJ0Z9ud5PEDUsaaAUeKFwAwCReVgGQkmMpmIPM4aWmR2nu2wEOfLh/74WJXuky8tk IWEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=9Bbw95HrQOTw2bONQmqz6P6tOaZ1A/CgHVcIe4nAo4s=; b=YCnQziHv5sQtZpB76lrpg8CYW6OHbTfdBnJfFPBcJLvn54B7wRscS9GnAndxTFkyvC dQPvcOJXCrqSH3wlWZHoWpNHvMkiK1TTHmxZ1/QHfCV0JkJ6CK9yQI3OcXaUd7ShRUbD El+j4S4yvQ0wsXFipRTkQBxXHQFnke/ppeyAsVFYtrJDi5cfjOgkNd2t/6QfKxGPU5ho JOic0zLyHyr7mKdNbKQVZMhvMQoCuh9PGx+QxO6XwfkU8v1kXVTmuq+mU1/OHAf/Gg1B K0/hu/o3tXxeqaInJcEkga2VuPKjtiY3XyXhhbjmSWofRe90KrM/HEONyKvbt1BNrEkm sdUQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v17-v6si190256pgh.35.2018.10.22.22.44.22; Mon, 22 Oct 2018 22:44:38 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727478AbeJWOFO (ORCPT + 99 others); Tue, 23 Oct 2018 10:05:14 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:8326 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726837AbeJWOFO (ORCPT ); Tue, 23 Oct 2018 10:05:14 -0400 X-IronPort-AV: E=Sophos;i="5.54,414,1534802400"; d="scan'208";a="283000269" Received: from 30.9-255-62.static.virginmediabusiness.co.uk (HELO [172.16.7.66]) ([62.255.9.30]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 07:43:22 +0200 Date: Tue, 23 Oct 2018 06:43:21 +0100 (BST) From: Julia Lawall X-X-Sender: jll@hadrien To: Shayenne da Luz Moura cc: Greg Kroah-Hartman , Hans de Goede , Michael Thayer , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: Re: [Outreachy kernel] [PATCH] staging: vboxvideo: Removed unnecessary parentheses In-Reply-To: <20181022223126.smnsopiu4cavq6zh@smtp.gmail.com> Message-ID: References: <20181022223126.smnsopiu4cavq6zh@smtp.gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Oct 2018, Shayenne da Luz Moura wrote: > This patch fixes the checkpatch.pl check: > > vbox_main.c:119: CHECK: Unnecessary parentheses around 'rects[i].x2 < > crtc->x' > vbox_main.c:119: CHECK: Unnecessary parentheses around 'rects[i].y2 < > crtc->y' Please use the imperative, in the subject line and in the patch. Also, try to say something other than "fixes" about what you do, which is not very descriptive. Say what you actually did and why, eg remove unneeded parentheses around the arguments of || to reduce clutter. It is useful to mention that the change was suggested by checkpatch. It is not essential to copy the whole checkpatch message, or at least not all of them. thanks, julia > > Signed-off-by: Shayenne da Luz Moura > --- > drivers/staging/vboxvideo/vbox_main.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/vboxvideo/vbox_main.c > index 429f6a453619..10a862674789 100644 > --- a/drivers/staging/vboxvideo/vbox_main.c > +++ b/drivers/staging/vboxvideo/vbox_main.c > @@ -116,10 +116,10 @@ void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb, > struct vbva_cmd_hdr cmd_hdr; > unsigned int crtc_id = to_vbox_crtc(crtc)->crtc_id; > > - if ((rects[i].x1 > crtc->x + crtc->hwmode.hdisplay) || > - (rects[i].y1 > crtc->y + crtc->hwmode.vdisplay) || > - (rects[i].x2 < crtc->x) || > - (rects[i].y2 < crtc->y)) > + if (rects[i].x1 > crtc->x + crtc->hwmode.hdisplay || > + rects[i].y1 > crtc->y + crtc->hwmode.vdisplay || > + rects[i].x2 < crtc->x || > + rects[i].y2 < crtc->y) > continue; > > cmd_hdr.x = (s16)rects[i].x1; > -- > 2.19.1 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20181022223126.smnsopiu4cavq6zh%40smtp.gmail.com. > For more options, visit https://groups.google.com/d/optout. >