Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4713793imd; Tue, 30 Oct 2018 06:25:47 -0700 (PDT) X-Google-Smtp-Source: AJdET5epOTNT//d5JbEJCzjBashql/lbBfKHxnjyUHoEvqDtRZF2Lup80k8f/txsx9gYolE1566O X-Received: by 2002:a17:902:3283:: with SMTP id z3-v6mr18842373plb.308.1540905946994; Tue, 30 Oct 2018 06:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540905946; cv=none; d=google.com; s=arc-20160816; b=z9QJkvYJt0HQLSlryi1WuvQ9+/ZzQtsI+B1mSLY4UFn/LnoD3ig09B3QExdPvEWfJd 4v1Hqj/aexjMrDwYWtAqbL7POYAgKANgo5wZ7LG8N/wnCxyF0+Mu8xC6dqfnnFNEoPG1 k1nEtD4++4wEjIn96iBU50NinvcUGRwd9Ork1qwrwnl9LIMNfxH41/Jk77sdl++cOZqJ B1UvczDdBxNAB6MSSGkwpn3J5mVKASLpv0XquTHdd9muK1CeHZU8sXR0v2ZzvcEIyFJj kAJtOsaXEVCKTDrqzu4GA3G6YjIp+qTovu8xnv/vgoETw2njYQRMSypXlrdBgaUx/vML vg7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0tvWIuMiJw/4Y7dL6jBm1tzFgVk3FPTPgVMpZk+uJoA=; b=L5bWrdGuH5lCvnFFqFrmEgJd+KLiKS0lIJhjPAwtkjx0PLOOGD/m729LVkJ2NfcP6F r2l07PHIFbWnQUl83YVeVaz5h9oCd1VM9CeO7Nicqb+/Aq7hctVdi/b38WZHZweBw6UJ A5D9QJAI9zNY7JHmoAt71FycxW1NYtRM2P8Fu0yJgdKvh0yiC62l/I251046W2CkAqcm 16+VuP5ReMgnO5rL/n6mH+jnnVNkveHhTO/sdVlZAkoLNYMijYGZTrDOcH/aiX2ntPRJ bvLH39/fB0M3kAnBnIwZVNKAmI7V4pZZNg2zzXCqm7Es91HW7piRBmxmyoGRxuXEdTCG xKoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k+8XoeKG; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y9-v6si23503033plk.407.2018.10.30.06.25.30; Tue, 30 Oct 2018 06:25:46 -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=@kernel.org header.s=default header.b=k+8XoeKG; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728115AbeJ3WQA (ORCPT + 99 others); Tue, 30 Oct 2018 18:16:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:50642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725853AbeJ3WP7 (ORCPT ); Tue, 30 Oct 2018 18:15:59 -0400 Received: from localhost (173-25-171-118.client.mchsi.com [173.25.171.118]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 77C30205F4; Tue, 30 Oct 2018 13:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540905753; bh=25ucqojyfC70GmvwUeOb5tjCN27kRMoedKdCdKasCmU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k+8XoeKGsit9tzrFo5AUZOcIG9eYw3wmilmnBMGsFZkiHUm6OWWG/7mnCPHSAO1rf WszcaozZAzrnrsAjNaG42TBdtSWMQBUrXztCo50btk8dfzDetKaQWSOWI7CpHa1ZBL GQCewrADaGFSy/iLet454sfyxBgku+Trh7LUqzTg= Date: Tue, 30 Oct 2018 08:22:32 -0500 From: Bjorn Helgaas To: Suganath Prabu Cc: lukas@wunner.de, linux-scsi@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, benh@kernel.crashing.org, ruscur@russell.cc, sbobroff@linux.ibm.com, oohall@gmail.com, andy.shevchenko@gmail.com, Sathya.Prakash@broadcom.com, sreekanth.reddy@broadcom.com Subject: Re: [v6 1/4] mpt3sas: Separate out mpt3sas_wait_for_ioc_to_operational Message-ID: <20181030132232.GA41022@google.com> References: <1540290081-15827-1-git-send-email-suganath-prabu.subramani@broadcom.com> <1540290081-15827-2-git-send-email-suganath-prabu.subramani@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1540290081-15827-2-git-send-email-suganath-prabu.subramani@broadcom.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 23, 2018 at 03:51:18PM +0530, Suganath Prabu wrote: > No functional changes. This section of code > "wait for IOC to be operational" is used in many places > across the driver, and hence moved this code in to > a function "mpt3sas_wait_for_ioc_to_operational()" > > Signed-off-by: Suganath Prabu I'm not really a reviewer of mpt3sas, but since I commented earlier, I took a quick look at this. Minor comments: - Remove leading spaces from changelog and reformat to use the whole width, e.g., No functional changes. This section of code "wait for IOC to be operational" is used in many places across the driver. Factor this code out into a new mpt3sas_wait_for_ioc_to_operational(). - "mpt3sas_wait_for_ioc_to_operational" isn't really grammatical in English; maybe "mpt3sas_wait_for_ioc" would be better? - It would be slightly easier to review this if it were split into three patches: (1) add and use the IOC_OPERATIONAL_WAIT_COUNT #define, (2) factor out mpt3sas_wait_for_ioc() using the exact same code structure (the while loop), and (3) convert mpt3sas_wait_for_ioc() to use the do loop instead of the while. The idea is that each individual patch is simpler and more obvious because it only contains a single logical change. Reviewed-by: Bjorn Helgaas