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: <49405ea2bb0bee16a41ce88b7d679ff714823585.camel@microchip.com>
Date:   Mon, 17 Apr 2023 12:47:20 +0000
From:   <VaibhaavRam.TL@...rochip.com>
To:     <michael@...le.cc>
CC:     <gregkh@...uxfoundation.org>, <linux-gpio@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <UNGLinuxDriver@...rochip.com>,
        <arnd@...db.de>
Subject: Re: [PATCH v9 char-misc-next 1/2] misc: microchip: pci1xxxx: Add
 support to read and write into PCI1XXXX OTP via NVMEM sysfs


> > +#include <linux/auxiliary_bus.h>
> > +#include <linux/bio.h>
> > +#include <linux/device.h>
> > +#include <linux/iopoll.h>
> > +#include <linux/kthread.h>
> 
> Is this needed? I don't see any threads. Also bio.h. Please double
> check
> your includes.
Ok, Will remove in next version of patch
> > +     if (priv != NULL)
> > +             rb = priv->reg_base;
> > +     else
> > +             return -ENODEV;
> 
> Unneeded check, priv cannot be NULL, right?
Ok, I think this can be removed
> > +
> > +             data = readl(rb +
> > MMAP_OTP_OFFSET(OTP_PASS_FAIL_OFFSET));
> > +             if (ret < 0 || data & OTP_FAIL_BIT)
> > +                     break;
> 
> No error handling?
We have implemented short read which returns count of successful bytes
read and therefore userspace will recognise the situation when the
requested count is not obtained.
> > +     if (!priv)
> > +             return dev_err_probe(&aux_dev->dev, -ENOMEM,
> > +                                  "Memory Allocation Failed\n");
> 
> Just return -ENOMEM. No need for that message.
Ok. Will remove

Thanks
Vaibhaav Ram

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ