title: in kernel program get root user id and compare with current user id
body: <p>As we know, the root uid is 0. so I tried to compare current process uid with 0. as follows: </p>
  
  <pre><code>uid_eq(get_current_cred()-&gt;uid, 0)
  </code></pre>
  
  <p>however, I get <em>incompatible type for argument 2 of ‘uid_eq’</em></p>
  
  <p>I have also tried</p>
  
  <pre><code>uid_eq(get_current_cred()-&gt;uid, (kuid_t)0)
  </code></pre>
  
  <p>but this also give this <em>error: conversion to non-scalar type requested</em></p>
  
  <p>How should I check if the current process is root in kernel? Thank you.</p>