Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2296164pxb; Wed, 9 Feb 2022 15:27:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyTyCgH7UFtTaRDBu/U88N9mIFRhJFBGojPd2ejbkKkHe4eHH5LHA/7b4Un+qHhxz/3/hdo X-Received: by 2002:a17:902:b286:: with SMTP id u6mr4513054plr.155.1644449256421; Wed, 09 Feb 2022 15:27:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644449256; cv=none; d=google.com; s=arc-20160816; b=CR4WBS5l06X4xRoX8uK4ybTEuKbGGbUQieHwFuocsS9FUf3gffEmjFnCI9k4V9c6u2 KL/28SRsTokMCC//891Pu1XGxtqSZ7duK3eQ6Z6U7A6uHKSo2OZc0x8Gz8SUy6Zcxb+B vLCVRmpewL4mvOwXDfRVTm4zy1A5PnbZSvQoPo93tfetdd6BO1AP6753k6ut/Cfqo+yS lVcUCcojzbu9QXqBqLoO5A2kSA6hE+TpevBS6wDfLiGncCo8tAEXhkdN+g9i6Ftcbxki bfrO4PGhGWpDCpNHQmnbY1J8OrZaoiUrg6E61Txvbt9JzcOoVW+a/5W1lg2Y7vvgsCoa ppXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=WGw3a2jH90xz1Q6cMZsVNgvYhAiRHboCMmiwJp9AygI=; b=D7C4raBjXriBT44W1iNxWQin64xPdjxBvg6pVF1wI4VTOAIequd9zqPpjtOytuWjXt B0i2l9VChgxs0DMGw5OyStnBCLalw7f/1UyR9/coclfbXIKZT6b2CBiKpJ4mJNjIbKbS ka0lYxrl8FUlH+RU6dAh+U4nlN05z2VManhIp0RaKcbY0ztvCo/c2SRqBy8CtQNr21i7 PnxQnKtNLfoOBN+w+58un03CerpHTwOnxULZZPiZR34NrfEsDHgku9BkEMv7W+DPgVag B8uS9KVMV2Y5FrlXAvaerzmypKeN+giLohuNyGpn7HbliBdGv6fcvIAsDOSbxgRl7pxc 1g9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=PDtQWwyc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r19si327428plr.17.2022.02.09.15.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 15:27:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=PDtQWwyc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7D223E06D968; Wed, 9 Feb 2022 15:20:38 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233413AbiBIVa5 (ORCPT + 99 others); Wed, 9 Feb 2022 16:30:57 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:58278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233405AbiBIVaz (ORCPT ); Wed, 9 Feb 2022 16:30:55 -0500 X-Greylist: delayed 323 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 09 Feb 2022 13:30:57 PST Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91593C0045A5; Wed, 9 Feb 2022 13:30:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1644442254; bh=PGc0WNXFAjQvHZe7dxOMXdROYvVfqvz2T9AO1zIL3gw=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=PDtQWwyctpDBrDVOCU09BSHEpR/edHJq7+XIdipKCdxaKePhx8d4kNjPwm/XzoD6u QNheeLhJ8lcH1JSpxSFkfbxEy7w07NvODZRKdLWyiyA+sQDuF4WLsMDlKBhGhqyHi1 CrmT8KkVRI4wW7tuRc2HBkWyzJiVqhPEEmtvUsTE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.20.60] ([92.116.150.166]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N1Obb-1oKiFR1jsh-012mVq; Wed, 09 Feb 2022 22:24:54 +0100 Message-ID: <2bfcb259-5f81-2110-2027-cc9e61d4d671@gmx.de> Date: Wed, 9 Feb 2022 22:24:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH] fbcon: use min() to make code cleaner Content-Language: en-US To: Sam Ravnborg , cgel.zte@gmail.com Cc: linux-fbdev@vger.kernel.org, ducheng2@gmail.com, penguin-kernel@i-love.sakura.ne.jp, daniel.vetter@ffwll.ch, Zeal Robot , deng.changcheng@zte.com.cn, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, cssk@net-c.es, geert@linux-m68k.org, svens@stackframe.org References: <20220209084810.1561184-1-deng.changcheng@zte.com.cn> From: Helge Deller In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-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qTS5o0NnZV4Tz3HfuixmOC Ol63MW2po2LnTF6fiAnk3lGhtr2/t2mqAtleP4xeyamjHPWWot8E+5sCOsimwEFCeQryZVEJd AhJGriZVy6aczmTdlpCZgXzaDdPyaVIDLG95KCccfoU51W9E3WaQ+6AMres7Qs+d7Iy1CorHT tEhtiSjY1Mi3eQ3+iY/QwOm8iTtIpIET5B0CskcISit3teKLkQsGsSGAJeycI11G5wTrY5fIb LaSNOjaBxZbcJMklNgJEiU4rZ7MGyVrkX/Vt7B33BTDB2aDpVk8J2O9BLJc13KIgc1V4s0kW9 OwH2EiKUoksplc= X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 2/9/22 19:54, Sam Ravnborg wrote: > On Wed, Feb 09, 2022 at 08:48:10AM +0000, cgel.zte@gmail.com wrote: >> From: Changcheng Deng >> >> Use min() in order to make code cleaner. >> >> Reported-by: Zeal Robot >> Signed-off-by: Changcheng Deng > Reviewed-by: Sam Ravnborg > > I had preferred in minmax.h was included, but it has an indirect include > so shrug. > > I assume Daniel or Helge will pick it up. Daniel has quite some upcoming changes to core/fbcon, so I prefer that he takes it when he thinks it's the right time... Helge > >> --- >> drivers/video/fbdev/core/fbcon.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/cor= e/fbcon.c >> index f36829eeb5a9..61171159fee2 100644 >> --- a/drivers/video/fbdev/core/fbcon.c >> +++ b/drivers/video/fbdev/core/fbcon.c >> @@ -602,7 +602,7 @@ static void fbcon_prepare_logo(struct vc_data *vc, = struct fb_info *info, >> save =3D kmalloc(array3_size(logo_lines, new_cols, 2), >> GFP_KERNEL); >> if (save) { >> - int i =3D cols < new_cols ? cols : new_cols; >> + int i =3D min(cols, new_cols); >> scr_memsetw(save, erase, array3_size(logo_lines, new_cols, 2)); >> r =3D q - step; >> for (cnt =3D 0; cnt < logo_lines; cnt++, r +=3D i) >> -- >> 2.25.1