Re: [PATCH for-next v10 01/11] RDMA/rxe: Reverse the sense of RXE_POOL_NO_ALLOC

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

 



On Fri, Feb 25, 2022 at 01:57:41PM -0600, Bob Pearson wrote:
> @@ -264,6 +261,12 @@ void *rxe_alloc(struct rxe_pool *pool)
>  	struct rxe_pool_elem *elem;
>  	void *obj;
>  
> +	if (!(pool->flags & RXE_POOL_ALLOC)) {
> +		pr_warn_once("%s: Pool %s must call rxe_add_to_pool\n",
> +				__func__, pool->name);

Just make these

if (WARN_ON(!(pool->flags & RXE_POOL_ALLOC)))
   return NULL;

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux