Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3351708pxv; Mon, 12 Jul 2021 15:33:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqu5zdoGvXpulni074ZY52+fWwxE0Z5FP7/gTnFiTEScs4CyDMWRGpNVJnahZw4Ha4Hzh1 X-Received: by 2002:a05:6402:1385:: with SMTP id b5mr1391941edv.276.1626129193024; Mon, 12 Jul 2021 15:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626129193; cv=none; d=google.com; s=arc-20160816; b=WgMGdUOOvUh9i2KC1IRTC7CwultwP1hMmlTVuFt6S6UiilK9Jv8AM4MOv7GWBUjsTM yHUbSzTlM4mQnsZIOMTdjto0t/R1c/f/74hVs14NuDo+w2+orcUhyGYraBWN1/ga+1Ky Ro9azmN5uqi0rgYTV8UoFwXc4+/YD7acbgqsh78ER5Y0NSHD+5DFFPawpJhR9OZSi/Ek z0ARWPd1sVe8UffagDj0/mHt+uv4dOdL5yNd1rgdjN0ZqAVHtMPPQCWiVKsC3asLbDUj zJwUUcVTLdveJWO1jBz40g/gv+/+vXuuF0hVAjLJBz91BepHsRz+roemALN/08Ky8hXr YVtw== 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=wH0jQXZtX/KYDxg1A4zg8XUSRP/LlRQYtunA5w5wgDRFhWhQQjUoDNpQ+M4iLVM2Pn 0XXkmC2cLOTUIAHffnL6JUV0+WKvhYWeUHbm60n3gh9StDcTUlU3oKfsoisLUlzL5Pqr mipml5cG/wA8bCK77w+98NgeM1l5mVyGlQUcgj/ufO8ljHRGvFXtFFmIcqPeBJxF+ZWg iYLJgai7QAw9EGKxXU5Zjnj7oNVeVZQTFdPc5WteMIORw05gcUqbKJ5W+o5xiif4SZa9 +dffclNaizePLvgW056qP6n7JbhZZKywm3toV2kt8iFYcy0pZfF/OPxW8vyCMge9Hl5U oPJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oJicI6Lj; 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 dp16si372830ejc.498.2021.07.12.15.32.48; Mon, 12 Jul 2021 15:33:13 -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=oJicI6Lj; 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 S230292AbhGLWej (ORCPT + 99 others); Mon, 12 Jul 2021 18:34:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbhGLWej (ORCPT ); Mon, 12 Jul 2021 18:34:39 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 410FCC0613DD; Mon, 12 Jul 2021 15:31:49 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id ga14so22641144ejc.6; Mon, 12 Jul 2021 15:31:49 -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=oJicI6Ljl/8N/RW0B4Eu9269AvWk4254+CzE0a4WGx5wtvY3E8Vx8EJ/MS/GhOxryQ NLttzDoJk9UgSGhzcr36D8fWlYHw97avl/GraTym/HIDBDk3Ne3/9AdJmuKsiDYAfxnl hSQCKahrdzclSvCNsxLVjD72H8cFWjr9XfO/AHK8ZuZyluccREAIEFvN9q7CiOS6rKTz XWLV1QLaa5rQjqQQf33rNkumMnnAbluFCQvw4NjnbYOtFuc4QzNfLdNRoGa+odXHTijW 6EJtMzXhr02tur8eEcLWNwDEBipaENuJ61vNQv/MGcUHADyaupbyP1ClKhiVAL7hXWOI FXsA== 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=c1o7dAjeGD7/GFUnmYUuWS9QWj8q/sevsZlDVHkWFytAuFg80CFqt2At+zpJiBb2q1 bLCd7SzkLaLpAE6vdPodAo842rIsHlwdZTNQg9C/0y6qbQScalhLv9zWqhcF2PKGTMSo KZNYPHIBc1q+REt6K8lY/vYfapPZFK/AytUlnSIVXd3aoWa9dcUA1V8DVowXpAGZSNP5 VsTW5LPfJc3kQ8GVBMLSixZzR27GNdbjFCYuVsokFT9yySyf4wxO/+DKkbN/aGtCgbLG 6T/lB44qjxH3JsCTR1eggt4TBKX4KPpXaIKQGKKh/sOBGsLJ2/u2Dyd1J9glaufvWZnV UjvQ== X-Gm-Message-State: AOAM531PiUFyALwrDi8IIr9kHcrj/1WITTI9vCWV+MXXMqn2F2aZ6w1c bB/cDzBaxE3FLDJZ3QdiYys= X-Received: by 2002:a17:907:1c9f:: with SMTP id nb31mr1579177ejc.342.1626129107896; Mon, 12 Jul 2021 15:31:47 -0700 (PDT) Received: from pc ([196.235.212.194]) by smtp.gmail.com with ESMTPSA id z10sm2560398ejg.3.2021.07.12.15.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 15:31:47 -0700 (PDT) Date: Mon, 12 Jul 2021 23:31:44 +0100 From: Salah Triki To: aacraid@microsemi.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] replace if with max() Message-ID: <20210712223144.GA1829295@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