From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18B28381D5; Fri, 15 Dec 2023 16:04:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=kernel.org X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="398084157" X-IronPort-AV: E=Sophos;i="6.04,279,1695711600"; d="scan'208";a="398084157" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2023 08:04:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="865445044" X-IronPort-AV: E=Sophos;i="6.04,279,1695711600"; d="scan'208";a="865445044" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2023 08:04:35 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rEAfw-00000006ACe-1HeD; Fri, 15 Dec 2023 18:04:32 +0200 Date: Fri, 15 Dec 2023 18:04:31 +0200 From: Andy Shevchenko To: tanzirh@google.com Cc: Kees Cook , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Nick DeSaulniers , Andrew Morton , llvm@lists.linux.dev, Al Viro Subject: Re: [PATCH v2 1/2] sh: Added kernel.h to word-at-a-time Message-ID: References: <20231214-libstringheader-v2-0-0f195dcff204@google.com> <20231214-libstringheader-v2-1-0f195dcff204@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231214-libstringheader-v2-1-0f195dcff204@google.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Thu, Dec 14, 2023 at 09:06:12PM +0000, tanzirh@google.com wrote: > This patch includes linux/kernel.h in asm/word-at-a-time.h for the > sh architecture. WORD_AT_A_TIME_CONSTANTS depends on kernel.h. > Making this implicit dependancy explicit allows for later improvements > in the lib/string.c inclusion list. > > Suggested-by: Al Viro You forgot your SoB, but... ... > #ifdef CONFIG_CPU_BIG_ENDIAN > # include > #else > +#include I highly discourage from doing that. Instead, split what is needed to the separate (new) header and include that one. > /* > * Little-endian version cribbed from x86. > */ -- With Best Regards, Andy Shevchenko