Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2288602rwl; Sat, 8 Apr 2023 11:25:46 -0700 (PDT) X-Google-Smtp-Source: AKy350aFuYbrudUijTuc9lX4bJiUg2turhX+LYqCoLc9aRNiUDIJ6OSLPbnooK4nWpaq95yG9G3X X-Received: by 2002:a17:907:989c:b0:94a:4d39:a518 with SMTP id ja28-20020a170907989c00b0094a4d39a518mr1067274ejc.21.1680978346539; Sat, 08 Apr 2023 11:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680978346; cv=none; d=google.com; s=arc-20160816; b=ztpJAboH66cTLYpd3EK6wbwb6PgCeDO3ATp3z06a/c4+zyjhg/hzgLGA4TQxx63McU YFvRyXRGVW9DsogjWTB7DWrdY/jpp4HViY9iVy5UEF43KoMkrMxIGkCiu3ReObNvTGdc 4S1cZv8NRabEsRE3Ad+OfvO39qkTuPOOBRD5/k1+EbMxXEBH5u/z0sX31d88dM4GR5p7 0sjb39TKjgDOax7ecOzx8wBxIYpHMj1xC3zMuyNGbWjIY5NlxW9TaoElvB+ly97y4KZA 1S61cstB+EJbbmI5CRQi/pLkYTbXiWaeuy0rdCOFAwJmLxzdVhAXHEvjkvLdk2Mrirhh MBQA== 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=jvEbHjnUF838lN07cBQDokhrXS5LHQhlJGEDy+0X8dg=; b=kzWuvmv9FMQD/5hsHLmwOKdUj2SdZ5NFKAVNtLZR2tiZl22iR17euCkm8zN1b/WYV3 cCLDARUykbS1J7FJ/+S9ghSjq8wlKHJjvXGv/9XpnXoNOOhYmoA0WrPtPMRJAcQ0QxGD GUtMpP5Z03wq0tYsxCd/Kdtvi9CJqWNMm3EsE5SablFczOcSNqxLkV+8iogWl0rPhLlj Asu8lWDpBTmyPZFvISMvpCF+0kah2tVpoRfpBQ3LQE5zgzsMg4ncorVBkIX452oEVWno SqB3Od+q/hhDIJlYD1P6CmvjZzsgNidTAVA5tiaFTC3lO/QKXrWAtJtolJBxGzwMQjLg wo8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pKaCg9Nv; 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 v5-20020a1709061dc500b0093defbd6292si5228872ejh.1049.2023.04.08.11.25.04; Sat, 08 Apr 2023 11:25:46 -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=pKaCg9Nv; 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 S229791AbjDHR5k (ORCPT + 99 others); Sat, 8 Apr 2023 13:57:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjDHR5i (ORCPT ); Sat, 8 Apr 2023 13:57:38 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5B3826AF; Sat, 8 Apr 2023 10:57:37 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id q2so6303590pll.7; Sat, 08 Apr 2023 10:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680976657; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jvEbHjnUF838lN07cBQDokhrXS5LHQhlJGEDy+0X8dg=; b=pKaCg9NvbIVEK6K78TRDwr7ES8jioxY4sJm/msDIOVRDyJt+iA1bmB53dmkiZOVL1d fOC6DNKI9nUj/jCL38UkC+xWXTwKXzQLBRExgCZ6RQ+2xWDncceniZG9LaIhYY4HzVy3 L/pamZjnVlGcZ1+N54NEaX5YpYVNnAoRTUFWd5JE5nGQ27nKn3uBuIimLSuuPMjqZ5J6 CSrcKn5tbqQqQlYEyJfUeFgmJ97xtzDsNwV7w90ErX3Lz/aPgbJ8cka8fImuXYX0AhCW 5T19DZ53L/uH3KR5juYWxPBzLZCtR86SxXIwqWMCiJgcMgfIe1KZtXAeFgnPdqNzVE4f yIXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680976657; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jvEbHjnUF838lN07cBQDokhrXS5LHQhlJGEDy+0X8dg=; b=ZcYxqPlxbxJ6Z8TE4w/nQ9B03Ct71MGN6/eH1cjsEcPPMAhekZC4MJ46kW7CBvYuHR w0JRtnGgL9VRYK6Tti09SYE2DsIrB1s6zfbhSXTH+YprsFlJvVp2lnVi4BLJzuOoi1jf zEU1OmjyO0voIODhgYrrUgHUk2IWW/etfZ4vImyk7jXcbesi+ffrZ1dUzkp/dv+2Ui+i oGigUrTGWcrtlcJ8BEpAd1+9vV2g7Lf7wNZitJ2lwS8aO707PhCbmsI2Agq/+aIFjPQ/ t9r4bJzKSkSjyapGyUBz6hmlB0tj1jZxVusKH3fCM1ghcnsssq51i9k33W9EIN605Eiv Ysbg== X-Gm-Message-State: AAQBX9dpTAkkXZSNxcxQPdPcHYyFTNbJ5YmT9Xs5Lv5Zftds0O1BNxLB S0z7cJ9bbzOYLxJVbibiWY8S1M462V5drkf8 X-Received: by 2002:a05:6a20:6014:b0:db:f682:65ed with SMTP id r20-20020a056a20601400b000dbf68265edmr6704234pza.61.1680976657232; Sat, 08 Apr 2023 10:57:37 -0700 (PDT) Received: from sumitra.com ([117.207.136.97]) by smtp.gmail.com with ESMTPSA id y15-20020aa7804f000000b00590ede84b1csm5178202pfm.147.2023.04.08.10.57.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Apr 2023 10:57:36 -0700 (PDT) Date: Sat, 8 Apr 2023 10:57:29 -0700 From: Sumitra Sharma To: Greg Kroah-Hartman Cc: Simon Horman , Manish Chopra , GR-Linux-NIC-Dev@marvell.com, Coiby Xu , netdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: qlge: Remove macro FILL_SEG Message-ID: <20230408175729.GA263118@sumitra.com> References: <20230405150627.GA227254@sumitra.com> <20230406144644.GB231658@sumitra.com> <2023040648-zeppelin-escapist-86d1@gregkh> <20230406152855.GC231658@sumitra.com> <2023040618-dedicate-rebalance-90c6@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2023040618-dedicate-rebalance-90c6@gregkh> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Thu, Apr 06, 2023 at 06:33:31PM +0200, Greg Kroah-Hartman wrote: > On Thu, Apr 06, 2023 at 08:28:55AM -0700, Sumitra Sharma wrote: > > On Thu, Apr 06, 2023 at 04:57:44PM +0200, Greg Kroah-Hartman wrote: > > > On Thu, Apr 06, 2023 at 07:46:44AM -0700, Sumitra Sharma wrote: > > > > On Wed, Apr 05, 2023 at 06:21:57PM +0200, Simon Horman wrote: > > > > > On Wed, Apr 05, 2023 at 08:06:27AM -0700, Sumitra Sharma wrote: > > > > > > Remove macro FILL_SEG to fix the checkpatch warning: > > > > > > > > > > > > WARNING: Macros with flow control statements should be avoided > > > > > > > > > > > > Macros with flow control statements must be avoided as they > > > > > > break the flow of the calling function and make it harder to > > > > > > test the code. > > > > > > > > > > > > Replace all FILL_SEG() macro calls with: > > > > > > > > > > > > err = err || qlge_fill_seg_(...); > > > > > > > > > > Perhaps I'm missing the point here. > > > > > But won't this lead to err always either being true or false (1 or 0). > > > > > Rather than the current arrangement where err can be > > > > > either 0 or a negative error value, such as -EINVAL. > > > > > > > > > > > > > Hi Simon > > > > > > > > > > > > Thank you for the point you mentioned which I missed while working on this > > > > patch. > > > > > > > > However, after thinking on it, I am still not able to get any fix to this > > > > except that we can possibly implement the Ira's solution here which is: > > > > > > > > https://lore.kernel.org/outreachy/64154d438f0c8_28ae5229421@iweiny-mobl.notmuch/ > > > > > > > > Although we have to then deal with 40 lines of ifs. > > > > > > Which implies that the current solution is the best one, so I would > > > recommend just leaving it as-is. > > > > > > > Hi greg > > > > Before leaving it I would like to know your opinion on the solution Dan is offering. > > I still think you should leave it as-is. > Okay, Thank you. Regards Sumitra Sharma > thanks, > > greg k-h