lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f17b239c-715a-7c9c-fb56-477daed28009@suse.de>
Date:   Fri, 23 Sep 2022 12:16:13 +0200
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Jani Nikula <jani.nikula@...ux.intel.com>,
        Maxime Ripard <maxime@...no.tech>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Ben Skeggs <bskeggs@...hat.com>,
        David Airlie <airlied@...ux.ie>,
        Maxime Ripard <mripard@...nel.org>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Emma Anholt <emma@...olt.net>,
        Karol Herbst <kherbst@...hat.com>,
        Samuel Holland <samuel@...lland.org>,
        Daniel Vetter <daniel@...ll.ch>, Lyude Paul <lyude@...hat.com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
        Chen-Yu Tsai <wens@...e.org>
Cc:     Hans de Goede <hdegoede@...hat.com>, nouveau@...ts.freedesktop.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Dave Stevenson <dave.stevenson@...pberrypi.com>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Phil Elwell <phil@...pberrypi.com>,
        intel-gfx@...ts.freedesktop.org,
        Noralf Trønnes <noralf@...nnes.org>,
        Dom Cobley <dom@...pberrypi.com>, linux-sunxi@...ts.linux.dev,
        Mateusz Kwiatkowski <kfyatek+publicgit@...il.com>,
        dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v2 10/33] drm/modes: Add a function to generate analog
 display modes

Hi

Am 23.09.22 um 11:18 schrieb Jani Nikula:
> On Fri, 23 Sep 2022, Thomas Zimmermann <tzimmermann@...e.de> wrote:
>> Am 22.09.22 um 16:25 schrieb Maxime Ripard:
>>> +	drm_dbg_kms(dev,
>>> +		    "Generating a %ux%u%c, %u-line mode with a %lu kHz clock\n",
>>> +		    hactive, vactive,
>>> +		    interlace ? 'i' : 'p',
>>> +		    params->num_lines,
>>> +		    pixel_clock_hz / 1000);
>>
>> Divide by HZ_PER_KHZ here and in other places.
>>
>>     https://elixir.bootlin.com/linux/latest/source/include/linux/units.h#L23
> 
>  From the Department of Bikeshedding:
> 
> I find "pixel_clock_hz / 1000" has much more clarity than
> "pixel_clock_hz / HZ_PER_KHZ".

This one's easy to see because it tells you with the _hz postfix. Many 
places don't and then it quickly gets confusing what units the code's 
converting.

Best regards
Thomas

> 
> I don't consider the SI prefixes magic numbers.
> 
> 
> BR,
> Jani.
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ