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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b47b79c7-1ddc-4336-8bbc-f524872198ca@roeck-us.net>
Date:   Tue, 29 Aug 2023 18:36:57 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Huibin Shi <henrys@...icom-usa.com>
Cc:     Henry Shi <henryshi2018@...il.com>,
        "hbshi69@...mail.com" <hbshi69@...mail.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
        "hdegoede@...hat.com" <hdegoede@...hat.com>,
        "markgross@...nel.org" <markgross@...nel.org>,
        "jdelvare@...e.com" <jdelvare@...e.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "platform-driver-x86@...r.kernel.org" 
        <platform-driver-x86@...r.kernel.org>,
        "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
        "hb_shi2003@...oo.com" <hb_shi2003@...oo.com>,
        Wen Wang <wenw@...icom-usa.com>
Subject: Re: [PATCH v5] Add Silicom Platform Driver

On Tue, Aug 29, 2023 at 10:17:47PM +0000, Huibin Shi wrote:
> Hi Guenter,
> 
> Appreciate your feedback. Please see my comments below.
> 
> Thanks
> Henry
> 
> -----Original Message-----
> From: Guenter Roeck <groeck7@...il.com> On Behalf Of Guenter Roeck
> Sent: Monday, August 28, 2023 8:41 PM
> To: Henry Shi <henryshi2018@...il.com>
> Cc: hbshi69@...mail.com; tglx@...utronix.de; mingo@...hat.com; bp@...en8.de; dave.hansen@...ux.intel.com; x86@...nel.org; hpa@...or.com; hdegoede@...hat.com; markgross@...nel.org; jdelvare@...e.com; linux-kernel@...r.kernel.org; platform-driver-x86@...r.kernel.org; linux-hwmon@...r.kernel.org; hb_shi2003@...oo.com; Huibin Shi <henrys@...icom-usa.com>; Wen Wang <wenw@...icom-usa.com>
> Subject: Re: [PATCH v5] Add Silicom Platform Driver
> 
> Caution: This is an external email. Please take care when clicking links or opening attachments.
> 
> 
> On Mon, Aug 28, 2023 at 05:26:22PM -0400, Henry Shi wrote:
> > The Silicom platform (silicom-platform) Linux driver for Swisscom 
> > Business Box (Swisscom BB) as well as Cordoba family products is a 
> > software solution designed to facilitate the efficient management and 
> > control of devices through the integration of various Linux 
> > frameworks. This platform driver provides seamless support for device 
> > management via the Linux LED framework, GPIO framework, Hardware 
> > Monitoring (HWMON), and device attributes. The Silicom platform 
> > driver's compatibility with these Linux frameworks allows applications 
> > to access and control Cordoba family devices using existing software 
> > that is compatible with these frameworks. This compatibility 
> > simplifies the development process, reduces dependencies on 
> > proprietary solutions, and promotes interoperability with other 
> > Linux-based systems and software.
> >
> > Signed-off-by: Henry Shi <henryshi2018@...il.com>
> 
> Again, my feedback is only for hwmon code.
> 
> [ ... ]
> 
> > +
> > +static int silicom_fan_control_read(struct device *dev,
> > +                                                                     enum hwmon_sensor_types type,
> > +                                                                     u32 attr, int channel,
> > +                                                                     
> > +long *val)
> 
> Excessively long continuation lines.
> That seeme to be the case for almost all continuation lines, except where it is too short. I'd suggest to run the patch through checkpatch --strict and fix what it reports.
> 
> total: 0 errors, 9 warnings, 18 checks, 1077 lines checked
> 
> is really a bit much.
> 
> Henry: OK, I will fix those warnings.
> 
> [ ... ]
> 
> > +
> > +     hwmon_dev = devm_hwmon_device_register_with_info(&device->dev, name, NULL,
> > +                             &silicom_chip_info, NULL);
> 
> Did you try to compile this with CONFIG_HWMON=n or with CONFIG_HWMON=m and SILICOM_PLATFORM=y ?
> 
> Henry: Great question. I did not try that before. When I force "CONFIG_HWMON=m and SILICOM_PLATFORM=y" and compile kernel, the build failed with message "silicom-platform.c:(.init.text+0x8ff5b): undefined reference to `devm_hwmon_device_register_with_info'". I tried following change in drivers/platform/x86/Kconfig:
> 
> config SILICOM_PLATFORM
> 	tristate "Silicom Edge Networking device support"
> 	depends on DMI
> 	select LEDS_CLASS_MULTICOLOR
> 	select GPIOLIB
> 	select HWMON  ----> added 

No, that is wrong. It needs to be "depends on HWMON",
or the hwmon code needs to be conditional and the dependency
must be something like "depends on HWMON || HWMON=n".

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ