Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp94889iog; Thu, 23 Jun 2022 23:25:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vnbtLeyrMweTM+7+ac2/rthTZGFuuGjjx4UK15VcrNRsCorPKc3IjDA37gtIuDox3UK30f X-Received: by 2002:a17:907:2d1f:b0:726:320d:3e0 with SMTP id gs31-20020a1709072d1f00b00726320d03e0mr1339964ejc.238.1656051926142; Thu, 23 Jun 2022 23:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656051926; cv=none; d=google.com; s=arc-20160816; b=H9T7kd0XqM0nDhKunqgFI0lLMy3dzLQ+eVIzpnBugLStza9aA3XNLRQQSJa43JhSMT qrx3+KdyHd5TkwUONliR2PvDhv9/qCLNpDJgXc2IVBS9nJceBSumEyE7U8ODyYTOmh9j ac7JL3t4lXi7hK56jDiBKRMyCuyPxlnuqVLGx2VbKZgMSTN0ATtOdfn/9Y9ZRp0YgtJ4 ODlF5jQKhph/dXt+hlUH3lmO3I3rfh9kOr9fHBGbaNOsmNkc9SxFSGxiNkjFQDN1Gf+k cWo3xurqjbTPs1/SpVn7uJYYK1TGkThgnM2L1p1aKX9pp4mNG97Ay/lCLM0sOpW/3vDD ZLxw== 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=kS7je0dcRsUISdffSoxUviDsBXhqWD5R3EEaLG3WV4Y=; b=cBAbuPYn25vCIjOWtENutFa8vn5t9qD519CIE1vHG5SP5K9Z+Hbl7c6yljutwg8kyP DJtnY7epwDfXVk7TQHZkmZgRCgeQI/BWaSI0MHuqmA4ohBz6ccDB4gw3UGZv+wKSC1yq VqfsGvZRC3F3YbIJpsYLgFv8yWrRJW0/2EAd/fJk+SY9umbMi4X3H5n99/DhyKV4AQRl sJu3ECHsgW1J/eNXrmvE3QkhcUJGmVE9MugAsuGtv9LcKOV1IMBMRZCGq50zas8gYD7I uA1q0tFqesVhEQwMhPyCgnoPgQU++URhmMzC51MyLiUyeXDb9bD9UWezXCE1ZfKL9pLH 4XJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=q8IkDnvh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d12-20020a50e40c000000b004356e098edesi2198883edm.389.2022.06.23.23.25.02; Thu, 23 Jun 2022 23:25:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=q8IkDnvh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229764AbiFXFwf (ORCPT + 99 others); Fri, 24 Jun 2022 01:52:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229598AbiFXFwe (ORCPT ); Fri, 24 Jun 2022 01:52:34 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90CDA699AF for ; Thu, 23 Jun 2022 22:52:33 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id l6so1187579plg.11 for ; Thu, 23 Jun 2022 22:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kS7je0dcRsUISdffSoxUviDsBXhqWD5R3EEaLG3WV4Y=; b=q8IkDnvh1Cu3hw8WQYu1Y0x7SAeul3kp00HcnhJ9OSTsHmoxPT4uZMfLUY0bxIMXku iT7LFJXWL78mzzuibDp5ul57Dad5Ka2v5ZV2DNYvSOEMsDCn520Wk31ZdpIGGdz9Kir4 8jBt4D7ZGZg4XF6QqTxAiRh7fPI6N+pq42/3fCKhlRoIl2twJtMFKC6VrUvCwITDur2U 5kFErN8MO5ZUdc+PO5hb999jXs3VHrPedfXuLAAb3tpdADbsqESXRIt22OmHH/5Y7xtc tdQn6hD1jF4GPRsRlIw8bLKu3nNOqU89sFC3Be2oVC1fLCxLj6iQeNHYMOijqYF2zdxY knjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kS7je0dcRsUISdffSoxUviDsBXhqWD5R3EEaLG3WV4Y=; b=ogTlP0OabvvjIKa1+zK93Gdni3sHxrbcxcK3QstU5YD4obgZEh4PCcY33vixiwTyyV cqxqUAbPqXatot5vAjGY/ZWVn65UwEca9erJad0e4lOD8zyqm6DEK1BnHxrlae3c6/HH e2fVxyTObKOjYwVLkAF18ZRjBsRKT8DTBg2jFlH02taHfd6AW0amMvKLaJqYpuQ3JHa9 MEJOrVWWyRNgfj5G1h8zRZ1sjr1pQQwOqQnc+MqT9tXtP+eT9e5Pd8/ZT0pJHsIPxRex xggP6Q4j4gAWnhCn39za8stbbLbg6sVBS0Hp6mXAEajj6r7XJAmlsyxeIs8P1Yh3eZUD nC+w== X-Gm-Message-State: AJIora8MZsdlX0V5SBWeNNxI47U6PFWL+sXXXG8dCQ2xh0IyZwKRqDdK Gh0OXc00LpHLhuEpqIRJXKs= X-Received: by 2002:a17:90b:794:b0:1ec:c760:5736 with SMTP id l20-20020a17090b079400b001ecc7605736mr1954563pjz.241.1656049952989; Thu, 23 Jun 2022 22:52:32 -0700 (PDT) Received: from localhost (c-67-180-87-133.hsd1.ca.comcast.net. [67.180.87.133]) by smtp.gmail.com with ESMTPSA id s17-20020a170903215100b0016a4ca6516dsm126589ple.278.2022.06.23.22.52.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jun 2022 22:52:32 -0700 (PDT) Date: Thu, 23 Jun 2022 22:52:14 -0700 From: Chang Yu To: Dan Carpenter Cc: Greg KH , Larry.Finger@lwfinger.net, phil@philpotter.co.uk, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: r8188eu: combine nested if statements into one Message-ID: References: <20220623031515.402691-1-marcus.yu.56@gmail.com> <20220623051404.410632-1-marcus.yu.56@gmail.com> <20220624053930.GU16517@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220624053930.GU16517@kadam> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 24, 2022 at 08:39:30AM +0300, Dan Carpenter wrote: > On Thu, Jun 23, 2022 at 08:34:54PM -0700, Chang Yu wrote: > > > - You did not specify a description of why the patch is needed, > > > > I'm not entirely sure how to fix this. I checked the original patch > > again and the subject and the body looks OK to me. I'm still a newbie so > > I might have missed a couple of things. It would be greatly appreciated > > if someone could point out what's missing. > > What's the advantage of combining if statements? Out of all the if > statements in the kernel why did you pick that one? Probably it's > because the indenting was wrong, no? > > Write the commit message like this: > > [PATCH v3] staging: r8188eu: clean up if statement > > I noticed that the if statement was strange and the code was indented > too far. It is cleaner to combine both if statements as well. > > regards, > dan carpenter Understood. Thank you for pointing this out to me. I didn't realize the description was too general. I simply assumed that the reason for combining if statements is obvious and did not elaborate. I see now this is not the right assumption to make. I will revise the patch shortly. Thank you! Best, Chang