From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 1F6AE1A0145 for ; Fri, 25 Sep 2015 12:12:03 +1000 (AEST) In-Reply-To: <1442977679-4468-1-git-send-email-vaibhav@linux.vnet.ibm.com> To: Vaibhav Jain , linuxppc-dev@lists.ozlabs.org From: Michael Ellerman Cc: Vaibhav Jain , mikey@neuling.org, Ian Munsie , Daniel Axtens Subject: Re: cxl: Fix lockdep warning while creating afu_err_buff attribute Message-Id: <20150925021203.0870C140789@ozlabs.org> Date: Fri, 25 Sep 2015 12:12:02 +1000 (AEST) List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2015-23-09 at 03:07:59 UTC, Vaibhav Jain wrote: > Presently a lockdep warning is reported during creation of afu_err_buff > bin_attribute for the afu. This is caused due to the variable attr.key > not pointing to a static class key, hence the function lockdep_init_map > reports this warning: > > BUG: key not in .data! > > The patch fixes this issue by calling sysfs_attr_init on the > attr_eb.attr structure before populating it with the afu_err_buff file > details. This will populate the attr.key variable with a static class > key so that lockdep_init_map stops complaining about the lockdep key not > being static. > > Reported-by: Daniel Axtens > Signed-off-by: Vaibhav Jain > Acked-by: Ian Munsie > Reviewed-by: Daniel Axtens Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/d6eb71a6d2eda21c8cd7a4dc cheers