From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C0D1C43331 for ; Mon, 30 Mar 2020 01:03:22 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 10BC2206F6 for ; Mon, 30 Mar 2020 01:03:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AES20ae/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10BC2206F6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id BF88888168; Mon, 30 Mar 2020 01:03:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yz1uvpvot7W5; Mon, 30 Mar 2020 01:03:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 0FEFD87E63; Mon, 30 Mar 2020 01:03:21 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id B1BCF1BF968 for ; Mon, 30 Mar 2020 01:03:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9F9E587E63 for ; Mon, 30 Mar 2020 01:03:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MOzcnXdeklM9 for ; Mon, 30 Mar 2020 01:03:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by hemlock.osuosl.org (Postfix) with ESMTPS id 7281887E5E for ; Mon, 30 Mar 2020 01:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585530196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yUugoluBnwyJRYALZAP5gLOlTOYfV1KHNo4jHyfrVrU=; b=AES20ae/+VJ/KiGHj55h1I++T0Ihszj8h8BCHpodNjZIpsTDwjvDnViDYAlrGhlJrR/nF5 MPJHM4oHItcdcYOoJhqzdFlCTNqrTJt9szLrrOT+zk8le+y44ffTweZanfGPITKMzMRMg6 hdmJBC/CA8coKl9adMgNdNNfpq32+zA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-236-b83Lbdv_Pw6HknSb_AfGbQ-1; Sun, 29 Mar 2020 21:03:12 -0400 X-MC-Unique: b83Lbdv_Pw6HknSb_AfGbQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC1F5189DF74; Mon, 30 Mar 2020 01:03:10 +0000 (UTC) Received: from elisabeth (unknown [10.40.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B388E60C63; Mon, 30 Mar 2020 01:03:08 +0000 (UTC) Date: Mon, 30 Mar 2020 03:03:03 +0200 From: Stefano Brivio To: Simran Singhal Subject: Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: Remove unnecessary braces for single statements Message-ID: <20200330030303.024899f7@elisabeth> In-Reply-To: <20200325140245.GA11949@simran-Inspiron-5558> References: <20200325140245.GA11949@simran-Inspiron-5558> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, outreachy-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" On Wed, 25 Mar 2020 19:32:45 +0530 Simran Singhal wrote: > Clean up unnecessary braces around single statement blocks. > Issues reported by checkpatch.pl as: > WARNING: braces {} are not necessary for single statement blocks > > Signed-off-by: Simran Singhal > --- > drivers/staging/rtl8723bs/core/rtw_efuse.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c > index bdb6ff8aab7d..de7d15fdc936 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_efuse.c > +++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c > @@ -43,9 +43,8 @@ Efuse_Read1ByteFromFakeContent( > u16 Offset, > u8 *Value) > { > - if (Offset >= EFUSE_MAX_HW_SIZE) { > + if (Offset >= EFUSE_MAX_HW_SIZE) > return false; > - } > /* DbgPrint("Read fake content, offset = %d\n", Offset); */ I find the resulting version a bit confusing: if (Offset >= EFUSE_MAX_HW_SIZE) return false; /* DbgPrint("Read fake content, offset = %d\n", Offset); */ if (fakeEfuseBank == 0) *Value = fakeEfuseContent[Offset]; The check on "Offset" isn't separated in any way by the following logic. I would suggest that you replace the closing brace by a newline, also for the other cases you're fixing up here: if (Offset >= EFUSE_MAX_HW_SIZE) return false; /* DbgPrint("Read fake content, offset = %d\n", Offset); */ ... -- Stefano _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel