lkml.org 
[lkml]   [2022]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 09/14] platform/x86/intel/ifs: Use generic microcode headers and functions
On Mon, Nov 07, 2022 at 02:53:18PM -0800, Jithu Joseph wrote:
> static int scan_chunks_sanity_check(struct device *dev)
> {
> - int metadata_size, curr_pkg, cpu, ret = -ENOMEM;
> struct ifs_data *ifsd = ifs_get_data(dev);
> + int curr_pkg, cpu, ret = -ENOMEM;
> bool *package_authenticated;
> struct ifs_work local_work;
> - char *test_ptr;
>
> package_authenticated = kcalloc(topology_max_packages(), sizeof(bool), GFP_KERNEL);
> if (!package_authenticated)
> return ret;

Bah, how big is that thing so that you can't simply do a bitfield on the
stack here instead of kcalloc-ing?

> @@ -203,67 +174,33 @@ static int scan_chunks_sanity_check(struct device *dev)
> return ret;
> }
>
> -static int ifs_sanity_check(struct device *dev,
> - const struct microcode_header_intel *mc_header)
> +static int ifs_image_sanity_check(struct device *dev, const struct microcode_header_intel *data)

Yet another static function - no need for the ifs_ prefix.

...

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2022-11-11 17:25    [W:0.569 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site