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: <CADnq5_PXOXiob3k5Z+cZz6K2k5iSCdzwNm0ZxKQOuC+PvdJxxg@mail.gmail.com>
Date:   Tue, 14 Sep 2021 15:48:31 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     Christian König <christian.koenig@....com>
Cc:     Huang Rui <ray.huang@....com>,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Guenter Roeck <linux@...ck-us.net>,
        LKML <linux-kernel@...r.kernel.org>, sparclinux@...r.kernel.org
Subject: Re: [PATCH] drm/ttm: fix the type mismatch error on sparc64

On Tue, Sep 7, 2021 at 6:25 AM Christian König <christian.koenig@....com> wrote:
>
> Am 07.09.21 um 12:03 schrieb Huang Rui:
> > __fls() on sparc64 return "int", but here it is expected as "unsigned
> > long" (x86). It will cause the build errors because the warning becomes
> > fatal while it is using sparc configuration. As suggested by Linus, it
> > can use min_t instead of min to force the type as "unsigned int".
> >
> > Suggested-by: Linus Torvalds <torvalds@...ux-foundation.org>
> > Signed-off-by: Huang Rui <ray.huang@....com>
> > Cc: Christian König <christian.koenig@....com>
>
> Reviewed-by: Christian König <christian.koenig@....com>

Is one of you going to push this to drm-misc?

Alex

>
> > ---
> >   drivers/gpu/drm/ttm/ttm_pool.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
> > index af1b41369626..c961a788b519 100644
> > --- a/drivers/gpu/drm/ttm/ttm_pool.c
> > +++ b/drivers/gpu/drm/ttm/ttm_pool.c
> > @@ -382,7 +382,8 @@ int ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
> >       else
> >               gfp_flags |= GFP_HIGHUSER;
> >
> > -     for (order = min(MAX_ORDER - 1UL, __fls(num_pages)); num_pages;
> > +     for (order = min_t(unsigned int, MAX_ORDER - 1, __fls(num_pages));
> > +          num_pages;
> >            order = min_t(unsigned int, order, __fls(num_pages))) {
> >               bool apply_caching = false;
> >               struct ttm_pool_type *pt;
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ