Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Joe Perches
On Tue, 2017-04-11 at 20:42 +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 11, 2017 at 11:15:54AM -0700, Joe Perches wrote: > > On Tue, 2017-04-11 at 16:09 +0200, Greg Kroah-Hartman wrote: > > > Care to use "real" kernel variable types please? u8, u16, and others > > > are you friend, uint8_t

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Joe Perches
On Tue, 2017-04-11 at 20:42 +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 11, 2017 at 11:15:54AM -0700, Joe Perches wrote: > > On Tue, 2017-04-11 at 16:09 +0200, Greg Kroah-Hartman wrote: > > > Care to use "real" kernel variable types please? u8, u16, and others > > > are you friend, uint8_t

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Greg Kroah-Hartman
On Tue, Apr 11, 2017 at 11:15:54AM -0700, Joe Perches wrote: > On Tue, 2017-04-11 at 16:09 +0200, Greg Kroah-Hartman wrote: > > Care to use "real" kernel variable types please? u8, u16, and others > > are you friend, uint8_t really isn't what we prefer, and checkpatch > > should tell you that...

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Greg Kroah-Hartman
On Tue, Apr 11, 2017 at 11:15:54AM -0700, Joe Perches wrote: > On Tue, 2017-04-11 at 16:09 +0200, Greg Kroah-Hartman wrote: > > Care to use "real" kernel variable types please? u8, u16, and others > > are you friend, uint8_t really isn't what we prefer, and checkpatch > > should tell you that...

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Joe Perches
On Tue, 2017-04-11 at 16:09 +0200, Greg Kroah-Hartman wrote: > Care to use "real" kernel variable types please? u8, u16, and others > are you friend, uint8_t really isn't what we prefer, and checkpatch > should tell you that... checkpatch doesn't warn about "u?int\d+_t" types unless --strict is

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Joe Perches
On Tue, 2017-04-11 at 16:09 +0200, Greg Kroah-Hartman wrote: > Care to use "real" kernel variable types please? u8, u16, and others > are you friend, uint8_t really isn't what we prefer, and checkpatch > should tell you that... checkpatch doesn't warn about "u?int\d+_t" types unless --strict is

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Thierry Escande
On 11/04/2017 16:11, Greg Kroah-Hartman wrote: On Tue, Apr 11, 2017 at 04:10:12PM +0200, Greg Kroah-Hartman wrote: On Tue, Apr 11, 2017 at 11:14:30AM +0200, Thierry Escande wrote: ... + } + + return VPD_OK; +} +EXPORT_SYMBOL(decode_vpd_string); Normally put the prefix for the

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Thierry Escande
On 11/04/2017 16:11, Greg Kroah-Hartman wrote: On Tue, Apr 11, 2017 at 04:10:12PM +0200, Greg Kroah-Hartman wrote: On Tue, Apr 11, 2017 at 11:14:30AM +0200, Thierry Escande wrote: ... + } + + return VPD_OK; +} +EXPORT_SYMBOL(decode_vpd_string); Normally put the prefix for the

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Thierry Escande
Hi Greg On 11/04/2017 16:09, Greg Kroah-Hartman wrote: On Tue, Apr 11, 2017 at 11:14:30AM +0200, Thierry Escande wrote: +#include + +#include "vpd_decode.h" + +static int decode_len(const int32_t max_len, const uint8_t *in, + int32_t *length, int32_t *decoded_len) +{ +

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Thierry Escande
Hi Greg On 11/04/2017 16:09, Greg Kroah-Hartman wrote: On Tue, Apr 11, 2017 at 11:14:30AM +0200, Thierry Escande wrote: +#include + +#include "vpd_decode.h" + +static int decode_len(const int32_t max_len, const uint8_t *in, + int32_t *length, int32_t *decoded_len) +{ +

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Greg Kroah-Hartman
On Tue, Apr 11, 2017 at 04:10:12PM +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 11, 2017 at 11:14:30AM +0200, Thierry Escande wrote: > > From: Wei-Ning Huang > > > > This patch imports lib_vpd.h and vpd_decode.c from the Chromium Vital > > Product Data project. > > > >

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Greg Kroah-Hartman
On Tue, Apr 11, 2017 at 04:10:12PM +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 11, 2017 at 11:14:30AM +0200, Thierry Escande wrote: > > From: Wei-Ning Huang > > > > This patch imports lib_vpd.h and vpd_decode.c from the Chromium Vital > > Product Data project. > > > > This library is used to

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Greg Kroah-Hartman
On Tue, Apr 11, 2017 at 11:14:30AM +0200, Thierry Escande wrote: > From: Wei-Ning Huang > > This patch imports lib_vpd.h and vpd_decode.c from the Chromium Vital > Product Data project. > > This library is used to parse VPD sections obtained from coreboot table > entries

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Greg Kroah-Hartman
On Tue, Apr 11, 2017 at 11:14:30AM +0200, Thierry Escande wrote: > From: Wei-Ning Huang > > This patch imports lib_vpd.h and vpd_decode.c from the Chromium Vital > Product Data project. > > This library is used to parse VPD sections obtained from coreboot table > entries describing Chromebook

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Greg Kroah-Hartman
On Tue, Apr 11, 2017 at 11:14:30AM +0200, Thierry Escande wrote: > From: Wei-Ning Huang > > This patch imports lib_vpd.h and vpd_decode.c from the Chromium Vital > Product Data project. > > This library is used to parse VPD sections obtained from coreboot table > entries

Re: [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Greg Kroah-Hartman
On Tue, Apr 11, 2017 at 11:14:30AM +0200, Thierry Escande wrote: > From: Wei-Ning Huang > > This patch imports lib_vpd.h and vpd_decode.c from the Chromium Vital > Product Data project. > > This library is used to parse VPD sections obtained from coreboot table > entries describing Chromebook

[PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Thierry Escande
From: Wei-Ning Huang This patch imports lib_vpd.h and vpd_decode.c from the Chromium Vital Product Data project. This library is used to parse VPD sections obtained from coreboot table entries describing Chromebook devices product data. Only the sections of type

[PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Thierry Escande
From: Wei-Ning Huang This patch imports lib_vpd.h and vpd_decode.c from the Chromium Vital Product Data project. This library is used to parse VPD sections obtained from coreboot table entries describing Chromebook devices product data. Only the sections of type VPD_TYPE_STRING are decoded.