Re: [PATCH v16 1/9] x86/resctrl: Prepare for new domain scope

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

 



Hi Tony,

On 3/12/2024 2:42 PM, Tony Luck wrote:

...

> @@ -392,9 +392,6 @@ struct rdt_domain *rdt_find_domain(struct rdt_resource *r, int id,
>  	struct rdt_domain *d;
>  	struct list_head *l;
>  
> -	if (id < 0)
> -		return ERR_PTR(-ENODEV);
> -

With this snippet rdt_find_domain() no longer returns ERR_PTR() ...

>  	list_for_each(l, &r->domains) {
>  		d = list_entry(l, struct rdt_domain, list);
>  		/* When id is found, return its domain. */


...


> @@ -507,6 +517,12 @@ static void domain_add_cpu(int cpu, struct rdt_resource *r)
>  
>  	lockdep_assert_held(&domain_list_lock);
>  
> +	if (id < 0) {
> +		pr_warn_once("Can't find domain id for CPU:%d scope:%d for resource %s\n",
> +			     cpu, r->scope, r->name);
> +		return;
> +	}
> +
>  	d = rdt_find_domain(r, id, &add_pos);
>  	if (IS_ERR(d)) {

... but there is a lingering IS_ERR() check here. I wanted to confirm that I missed
this in v13 but this looked differently in that version and seems to have
sneaked in since then.

Reinette




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux