Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1953462ybb; Sun, 29 Mar 2020 18:09:59 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuKzBoKYyEjjK73VXGYwhvQsmeR/mCd7F8rNljxsGUjuWhuk5tc4UiteJYvNz6q1l4/B43r X-Received: by 2002:a05:6830:168b:: with SMTP id k11mr7804026otr.156.1585530599622; Sun, 29 Mar 2020 18:09:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585530599; cv=none; d=google.com; s=arc-20160816; b=eGsolVcPbI6icWR60ebInBuz/m22aOn6968G27nbGaJjNCYTb88Z8eLrF6RydMLCtJ zWXCxqyUT4RMDhasrlQSi0jY/GiRkWddJtwrqunYyz4tOkx9EgTmFnieAgvaLOSOUmDn DYaKt/PC3TBVXfNDZAPY7Y4/cp8TQ5Xfx4lUOp/XBpk9AjgPRhjEYhUde+o2rJcJS4t8 SaHc2ycKwqlKe3A852rmren0V3Vcyw+HRm3Byvfs09lrPzpG2SoSYFftj16OS30uUi00 b2K44UhCxZyaJdBgZUThyyKwyOFA0q904kyxu+6uUN2EredQ9eukTqPq6xqq//SUbCNM nAAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=yUugoluBnwyJRYALZAP5gLOlTOYfV1KHNo4jHyfrVrU=; b=bqQi+ppzAbV6ffCNOgBt8AObOZ8A4b9yZnEziPbZCiE+4Y4NzaNEfbwU5aAJgy94nK Wsp2OAFJnusFz9DMUApU7WU2kntxD+V7tnrm0R6uR4N5HV1puiene/HTvXBHOjg9DSeo It1P6PdQDkFgGwerLkRRlxXfDKHA00Xi0X9ktVmmfinCLW7WUH9C9gBqQcJvHkr4UlA0 puumssXZ4ts9wthp2QwqHg0CblkgZnbEstdMTe3F1oYB5qcvrqW1fVVSzCPZ3UdH29+c FUiSE7Ie+UhmJ/7YXUgdpHxKkR5oqAhB85vtbowvLoJT2QlFCn9tOJOoli6KPmtgo7jd obDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QYVfcmTp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y19si5288503oie.128.2020.03.29.18.09.46; Sun, 29 Mar 2020 18:09:59 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QYVfcmTp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727955AbgC3BDR (ORCPT + 99 others); Sun, 29 Mar 2020 21:03:17 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:36856 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727815AbgC3BDR (ORCPT ); Sun, 29 Mar 2020 21:03:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585530195; 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=QYVfcmTpTyqlI6/n4EpmU6sdGg1yElmszpwjnvQA4U1vuuAn9GqMXLHpi2PJ625zJRVyQb kkP53PJ73X8fwPcVsq/AR/DRFBLdu8JuNB/x7gFDfWBqQEwq6Fd4pGM9CN6WzxoEeYGU1d LRutuUjdVOid+3Hja8pSjTil7xSCXS4= 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 Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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