Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp724050pxv; Thu, 22 Jul 2021 10:34:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbXcActlAy7iADzzBN6stR1lNMdWKnE3v0E+8KqihCJnm3u/X4b+de7Y5d5p8Tg/lHnetr X-Received: by 2002:a05:6402:4413:: with SMTP id y19mr893404eda.142.1626975243902; Thu, 22 Jul 2021 10:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626975243; cv=none; d=google.com; s=arc-20160816; b=UIEH3Rb8WzgfhtuJIUd+Mqn/nYPCVylM98zRRmtPVUgszSPzACmDl9N5q93DxJwrXm j/da6jqAmMyZuWuCE0SYlmhGZz4UoZYhIw/AJjd0ZFGlxbxO9BixYbgIbAG/7RyTSTzz oCEL5x20HczEqKPEdzNDKjd/3joBBFs9IYfGVQpCb62jzxWzZ0EPP/katYF09Sv2xMv2 NtTcxcD/6EDhAjBAolC6f9ZCVWNV8u54yEP/wi61k+7e7TauF9USgcY+T3d7ZwknisiZ TEfDEUbBG+cpHrlBplr4LjPxwpU9m2JPPoxZjrljCM0if9drYnS6w/QUZtVaDXuy+UkQ t90A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=MGeh56W62eK1hUI+wy5/PVDZC2f+e5pmmh2hY+I14MU=; b=o9oHtWIpb8ZyAiDleXujz504nNQZ+m+8hQsSsOPXO/gTQdq0PAXD0+0jpOpmmpXDXL 0md02lg3pO8hKtYcr63/6PIiJNgtMUsAsbHAWq1p+OlnF0BUP3joEYVa7mS+ZQbiAp8W 8HgGTAPNvZCTemG+UaYZ9roaMNPGlRwRqw5WDbhe03YuDPHJmrHIK8MrceffPfrmF8mF XIWAsU6w0gc20cWbkogpieHXSJBdAwdevAxsUoEmG8+JEr0wjlv2edLtM0e4Elh7K8Tp 7EjG0asVVINS5/vY8Ny5lEKu+eVU8u/+PWjAfEi81EEzZrg6NveQn0FZ0bYF4yEzEy31 2tLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G2MfvDi+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x7si4001303edd.162.2021.07.22.10.33.39; Thu, 22 Jul 2021 10:34:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G2MfvDi+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229826AbhGVQvn (ORCPT + 99 others); Thu, 22 Jul 2021 12:51:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbhGVQvm (ORCPT ); Thu, 22 Jul 2021 12:51:42 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0567BC061575; Thu, 22 Jul 2021 10:32:17 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id a80-20020a1c98530000b0290245467f26a4so123485wme.0; Thu, 22 Jul 2021 10:32:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=MGeh56W62eK1hUI+wy5/PVDZC2f+e5pmmh2hY+I14MU=; b=G2MfvDi+mldKJYf+TVgjnyifVOvpHLgB2k53AwkYamHiyXHmTyDKLFUqTs5h+Rjgih Ta6rD4sn6WlPpTiVGr7NRzzwluKUNaKFLMwQHO8BP1xvmOOPPsP7oL4EToNgTigVtjF6 mmy94+NOd83orVDahHQ5/jcHeU2R7B4DqwkryrTjhk4e9HFWcLwRmvtVjENy+OGu9eQ4 kgB+g09tUj9vLVXf7wtakZ0MoN+Uz0ykHlaJBRciwVVg1mlbGQUS2DS8yozi3cMervOV /HB9T2CvTlmxOAZsvAg/yLU20bdjjFSGHgUGkU+vn0098j6JuiUzqYMzgbQgPoqyO5Ej fjIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=MGeh56W62eK1hUI+wy5/PVDZC2f+e5pmmh2hY+I14MU=; b=pNz/34ccGFEbSMTdJtE1hDzPqBgEfFtnti0p/KweBd+5ub9PO5Uep+iYOWlRhg4qHc WhvJk8wq0Udz+0zDTsfvAV2nLg8hDNPUdVR9LvU8RlHREIIOr2ed2jg80J2s+v1Rt36x FAAxQX3i2J2CqBuznfd5Qe935tyOidK3iM9wtniP4dlXvIPLHdF1TYlU6/IX3+yMNRFF VjhbBxo5qM60RTXWW80207F7zcoDYObi3GprZ3FWo85HWj+wSQKHFx1R17QbIDF/Gd3Q TF1qvcqHAizR8GREPKzeuCsPSprqH1H+8NqoyUKRsRgA3j+b2GSyqTCGS9vPW/P+TI7S 29oQ== X-Gm-Message-State: AOAM530m8IhcFxmYg8b8hwTopIFzsGg/SnbJTTq0iaGb16wJPtxefD4X YWZtYprqZIG8w+zKubLv/yE= X-Received: by 2002:a7b:c041:: with SMTP id u1mr636335wmc.95.1626975135612; Thu, 22 Jul 2021 10:32:15 -0700 (PDT) Received: from pc ([196.235.233.206]) by smtp.gmail.com with ESMTPSA id z17sm17018074wrr.35.2021.07.22.10.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 10:32:15 -0700 (PDT) Date: Thu, 22 Jul 2021 18:32:12 +0100 From: Salah Triki To: aacraid@microsemi.com, "James E.J. Bottomley" , "Martin K. Petersen" , gregkh@linuxfoundation.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND] scsi: aacraid: aachba: replace if with max() Message-ID: <20210722173212.GA5685@pc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace if with max() in order to make code more clean. Signed-off-by: Salah Triki --- drivers/scsi/aacraid/aachba.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 46b8dffce2dd..330224f08fd3 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -485,8 +485,8 @@ int aac_get_containers(struct aac_dev *dev) if (status != -ERESTARTSYS) aac_fib_free(fibptr); - if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS) - maximum_num_containers = MAXIMUM_NUM_CONTAINERS; + maximum_num_containers = max(maximum_num_containers, MAXIMUM_NUM_CONTAINERS); + if (dev->fsa_dev == NULL || dev->maximum_num_containers != maximum_num_containers) { -- 2.25.1