From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752112AbcFFIXn (ORCPT ); Mon, 6 Jun 2016 04:23:43 -0400 Received: from mga01.intel.com ([192.55.52.88]:56714 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751295AbcFFIXl (ORCPT ); Mon, 6 Jun 2016 04:23:41 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,426,1459839600"; d="scan'208";a="116730871" Message-ID: <1465201496.1767.91.camel@linux.intel.com> Subject: Re: [PATCH v2 3/2] lib/uuid.c: Silence an unchecked return value warning From: Andy Shevchenko To: George Spelvin Cc: bjorn@mork.no, linux-kernel@vger.kernel.org, matt@codeblueprint.co.uk, rv@rasmusvillemoes.dk Date: Mon, 06 Jun 2016 11:24:56 +0300 In-Reply-To: <20160605192527.23210.qmail@ns.sciencehorizons.net> References: <20160605192527.23210.qmail@ns.sciencehorizons.net> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.2-2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2016-06-05 at 15:25 -0400, George Spelvin wrote: > From andriy.shevchenko@linux.intel.com Sun Jun 05 14:19:48 2016 > X-ExtLoop1: 1 > X-IronPort-AV: E=Sophos;i="5.26,421,1459839600";  >    d="scan'208";a="995605979" > Subject: Re: [PATCH v2 3/2] lib/uuid.c: Silence an unchecked return > value >  warning > From: Andy Shevchenko > To: George Spelvin > Cc: bjorn@mork.no, linux-kernel@vger.kernel.org, matt@codeblueprint.co > .uk,  > rv@rasmusvillemoes.dk > Date: Sun, 05 Jun 2016 17:21:04 +0300 > In-Reply-To: <20160604131622.28377.qmail@ns.sciencehorizons.net> > References: <20160604131622.28377.qmail@ns.sciencehorizons.net> > Organization: Intel Finland Oy > Content-Type: text/plain; charset="UTF-8" > X-Mailer: Evolution 3.20.2-2  > Mime-Version: 1.0 > Content-Transfer-Encoding: 8bit ^^^^ Something wrong with mail configuration? > > Andy Shevchenko worte: > > On Sat, 2016-06-04 at 09:16 -0400, George Spelvin wrote: > > Which I against of. Please, use normal hex_to_bin() calls here. > > > > Compiler will inline it anyway, but at least will not do second > > check > > for nothing. > > Um... huh?  Neither hex_to_bin() nor hex2bin() are inline functions. > They're declared as extern in and defined in > lib/hexdump.c. > > One call is smaller than two calls, which is why I did that. > > It's also faster, as hex_to_bin() *is* inlined within hex2bin() > (if you compile with -O). To be sure it faster we need the measurements. Sometimes it's not obvious. > > Is your request based on a false premise? Yeah, you are right, I looked at hex2bin() which is in the same module. -- Andy Shevchenko Intel Finland Oy