lkml.org 
[lkml]   [2018]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 25/32] staging: gasket: apex_ioctl_check_permissions use bool return type
    Date
    From: Todd Poynor <toddpoynor@google.com>

    Convert from int return to bool.

    Reported-by: Guenter Roeck <groeck@chromium.org>
    Signed-off-by: Simon Que <sque@chromium.org>
    Signed-off-by: Todd Poynor <toddpoynor@google.com>
    ---
    drivers/staging/gasket/apex_driver.c | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c
    index 6953b3b35ab50..a1113c9faee9b 100644
    --- a/drivers/staging/gasket/apex_driver.c
    +++ b/drivers/staging/gasket/apex_driver.c
    @@ -141,7 +141,7 @@ static int apex_reset(struct gasket_dev *gasket_dev, uint type);

    static int apex_get_status(struct gasket_dev *gasket_dev);

    -static uint apex_ioctl_check_permissions(struct file *file, uint cmd);
    +static bool apex_ioctl_check_permissions(struct file *file, uint cmd);

    static long apex_ioctl(struct file *file, uint cmd, void __user *arg);

    @@ -626,9 +626,9 @@ static bool is_gcb_in_reset(struct gasket_dev *gasket_dev)
    * @file: File pointer from ioctl.
    * @cmd: ioctl command.
    *
    - * Returns 1 if the current user may execute this ioctl, and 0 otherwise.
    + * Returns true if the current user may execute this ioctl, and false otherwise.
    */
    -static uint apex_ioctl_check_permissions(struct file *filp, uint cmd)
    +static bool apex_ioctl_check_permissions(struct file *filp, uint cmd)
    {
    return !!(filp->f_mode & FMODE_WRITE);
    }
    --
    2.18.0.203.gfac676dfb9-goog
    \
     
     \ /
      Last update: 2018-07-17 23:06    [W:6.896 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site