lkml.org 
[lkml]   [2018]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2] char_dev: Fix off-by-one bugs in find_dynamic_major()
Thanks!

On 05/02/18 07:25 PM, Srivatsa S. Bhat wrote:
> From: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
>
> CHRDEV_MAJOR_DYN_END and CHRDEV_MAJOR_DYN_EXT_END are valid major
> numbers. So fix the loop iteration to include them in the search for
> free major numbers.
>
> While at it, also remove a redundant if condition ("cd->major != i"),
> as it will never be true.
>
> Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>

Reviewed-by: Logan Gunthorpe <logang@deltatee.com>


Logan

\
 
 \ /
  Last update: 2018-02-06 18:15    [W:0.042 / U:0.428 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site