From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752790AbcFBCxL (ORCPT ); Wed, 1 Jun 2016 22:53:11 -0400 Received: from AUSXIPPC110.us.dell.com ([143.166.85.200]:38105 "EHLO ausxippc110.us.dell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbcFBCxJ convert rfc822-to-8bit (ORCPT ); Wed, 1 Jun 2016 22:53:09 -0400 DomainKey-Signature: s=smtpout; d=dell.com; c=nofws; q=dns; h=X-LoopCount0:X-IronPort-AV:From:To:CC:Subject: Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language: X-MS-Has-Attach:X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader:x-originating-ip: Content-Type:Content-Transfer-Encoding:MIME-Version: Return-Path; b=Rv7T6+4yp4GKAtKRsmp0OFGOgSBFmAkWEVRCBtIbVty4idl101mPySk5 onbfl2kE6rlmUWgDoDrSu1QNpXLiR2vLY43hSoJK3fj3x4OskqtsLOttn Se8SOFbtUJJCvtpx2Y5AfWAwcRRA+G4PVZjerTrvx5oSS/denhLNgRWSd U=; X-LoopCount0: from 10.175.216.250 X-IronPort-AV: E=Sophos;i="5.26,404,1459832400"; d="scan'208";a="316744898" From: To: CC: , , , , , Subject: RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address Thread-Topic: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address Thread-Index: AQHRvE+xMb9mMEf0UUOJaXsVnbGJUp/Vj2eA///qYPA= Date: Thu, 2 Jun 2016 02:53:06 +0000 Message-ID: References: <1464817844-27206-1-git-send-email-mario_limonciello@dell.com> <20160601230535.GA29279@kroah.com> In-Reply-To: <20160601230535.GA29279@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.132.225.94] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > +static u8 amac_ascii_to_hex(int c) > > +{ > > + if (c <= 0x39) > > + return (u8)(c - 0x30); > > + else if (c <= 0x46) > > + return (u8)(c - 0x37); > > + return (u8)(c - 0x57); > > +} > Sorry forgot to address this. > We really don't have such a function somewhere in the kernel already? There is a function in acpi/acpica/uthex.c that does this, but it doesn't seem to be used by anything outside of acpica so far. Would it be OK style wise to #include " ../../acpi/acpica/acutils.h" from r8152.c? If not, then what is the proper thing to do here to re-use it from there? > And why 'int', isn't "c" really a u8? Yeah I guess u8 should be fine there, and avoid the casting then too.