Re: [PATCH 02/13] selinux: Cleanup printk logging in ebitmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 12, 2018 at 4:09 AM Peter Enderborg
<peter.enderborg@xxxxxxxx> wrote:
>
> Replace printk with pr_* to avoid checkpatch warnings.
>
> Signed-off-by: Peter Enderborg <peter.enderborg@xxxxxxxx>
> ---
>  security/selinux/ss/ebitmap.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)

Merged, thanks.

> diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c
> index 5ae8c61b75bf..8f624f80055b 100644
> --- a/security/selinux/ss/ebitmap.c
> +++ b/security/selinux/ss/ebitmap.c
> @@ -362,7 +362,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
>         count = le32_to_cpu(buf[2]);
>
>         if (mapunit != BITS_PER_U64) {
> -               printk(KERN_ERR "SELinux: ebitmap: map size %u does not "
> +               pr_err("SELinux: ebitmap: map size %u does not "
>                        "match my size %zd (high bit was %d)\n",
>                        mapunit, BITS_PER_U64, e->highbit);
>                 goto bad;
> @@ -383,19 +383,19 @@ int ebitmap_read(struct ebitmap *e, void *fp)
>         for (i = 0; i < count; i++) {
>                 rc = next_entry(&startbit, fp, sizeof(u32));
>                 if (rc < 0) {
> -                       printk(KERN_ERR "SELinux: ebitmap: truncated map\n");
> +                       pr_err("SELinux: ebitmap: truncated map\n");
>                         goto bad;
>                 }
>                 startbit = le32_to_cpu(startbit);
>
>                 if (startbit & (mapunit - 1)) {
> -                       printk(KERN_ERR "SELinux: ebitmap start bit (%d) is "
> +                       pr_err("SELinux: ebitmap start bit (%d) is "
>                                "not a multiple of the map unit size (%u)\n",
>                                startbit, mapunit);
>                         goto bad;
>                 }
>                 if (startbit > e->highbit - mapunit) {
> -                       printk(KERN_ERR "SELinux: ebitmap start bit (%d) is "
> +                       pr_err("SELinux: ebitmap start bit (%d) is "
>                                "beyond the end of the bitmap (%u)\n",
>                                startbit, (e->highbit - mapunit));
>                         goto bad;
> @@ -405,8 +405,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
>                         struct ebitmap_node *tmp;
>                         tmp = kmem_cache_zalloc(ebitmap_node_cachep, GFP_KERNEL);
>                         if (!tmp) {
> -                               printk(KERN_ERR
> -                                      "SELinux: ebitmap: out of memory\n");
> +                               pr_err("SELinux: ebitmap: out of memory\n");
>                                 rc = -ENOMEM;
>                                 goto bad;
>                         }
> @@ -418,7 +417,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
>                                 e->node = tmp;
>                         n = tmp;
>                 } else if (startbit <= n->startbit) {
> -                       printk(KERN_ERR "SELinux: ebitmap: start bit %d"
> +                       pr_err("SELinux: ebitmap: start bit %d"
>                                " comes after start bit %d\n",
>                                startbit, n->startbit);
>                         goto bad;
> @@ -426,7 +425,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
>
>                 rc = next_entry(&map, fp, sizeof(u64));
>                 if (rc < 0) {
> -                       printk(KERN_ERR "SELinux: ebitmap: truncated map\n");
> +                       pr_err("SELinux: ebitmap: truncated map\n");
>                         goto bad;
>                 }
>                 map = le64_to_cpu(map);
> --
> 2.15.1
>


-- 
paul moore
www.paul-moore.com

_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux