Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754534AbZATI0S (ORCPT ); Tue, 20 Jan 2009 03:26:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753537AbZATI0A (ORCPT ); Tue, 20 Jan 2009 03:26:00 -0500 Received: from yw-out-2324.google.com ([74.125.46.30]:44748 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753076AbZATIZ6 (ORCPT ); Tue, 20 Jan 2009 03:25:58 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=CQrV0um9x+e4mIK7KaQHElRGepweyGgoQu7enszkZUPBrsIfnP+7UlrKG78C7sSQ0X lhtw9UtO+QIz7dNvzanyUDm4bzX0TqqyAdnP/sSMtVnWrsZ5ase8nObX4DUaqwB/Ka6Z rQlMpOo3X0EeH4DT5ss1r4Km8P8No90pAhwWM= Message-ID: <57afda040901200025q6bc1bab1id9a1e6d6eac86d17@mail.gmail.com> Date: Tue, 20 Jan 2009 17:25:56 +0900 From: "unsik Kim" To: "Harvey Harrison" Subject: Re: [PATCH] mflash: remove small byteswapping function Cc: "Heikki Orsila" , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, "Alan Cox" In-Reply-To: <1231183585.11902.6.camel@brick> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_22061_747101.1232439957065" References: <57afda040901041718g1415e210hfd0991270dfdd72d@mail.gmail.com> <20090105023346.GE6115@zakalwe.fi> <20090105111321.7d210c01@lxorguk.ukuu.org.uk> <1231183585.11902.6.camel@brick> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 41673 Lines: 588 ------=_Part_22061_747101.1232439957065 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thank you for suggestions. I removed mg_fix_disk_id and remove byteswap at mg_ide_fixstring. I attached fixed code. 2009/1/6 Harvey Harrison : > Byteswap as we read in the data rather than having a > byteswap in place function that is only used once. > > MG_SECTOR_SIZE >> 1 == 256 so this should be a no-op. > > Signed-off-by: Harvey Harrison > --- > Also, you always call mg_ide_fixstring with byteswap == 1, > I'd suggest removing that parameter and doing it unconditionally. > > drivers/block/mg_disk.c | 17 +---------------- > 1 files changed, 1 insertions(+), 16 deletions(-) > > diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c > index 24edc9a..116f2a3 100644 > --- a/drivers/block/mg_disk.c > +++ b/drivers/block/mg_disk.c > @@ -141,20 +141,6 @@ static irqreturn_t mg_irq(int irq, void *dev_id) > return IRQ_HANDLED; > } > > -static void mg_fix_disk_id(u16 *id) > -{ > -#ifndef __LITTLE_ENDIAN > -# ifdef __BIG_ENDIAN > - int i; > - > - for (i = 0; i < 256; i++) > - id[i] = __le16_to_cpu(id[i]); > -# else > -# error "Please fix " > -# endif > -#endif > -} > - > static void mg_ide_fixstring(u8 *s, const int bytecount, const int byteswap) > { > u8 *p, *end = &s[bytecount & ~1]; /* bytecount must be even */ > @@ -194,12 +180,11 @@ static int mg_get_disk_id(struct mg_host *host) > err = mg_wait(host, MG_REG_STATUS_BIT_DATA_REQ, 3000); > if (!err) { > for (i = 0; i < (MG_SECTOR_SIZE >> 1); i++) > - id[i] = inw(host->dev_base + MG_BUFF_OFFSET + i * 2); > + id[i] = le16_to_cpu(inw(host->dev_base + MG_BUFF_OFFSET + i * 2)); > > outb(MG_CMD_RD_CONF, host->dev_base + MG_REG_COMMAND); > err = mg_wait(host, MG_STAT_READY, 3000); > if (!err) { > - mg_fix_disk_id(id); > if ((host->id_data.field_valid & 1) == 0) { > err = MG_ERR_TRANSLATION; > } else { > -- > 1.6.1.71.gd5e04 > > > > ------=_Part_22061_747101.1232439957065 Content-Type: application/octet-stream; name=mg_disk.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fq6athi60 Content-Dis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iKTsKKwlpZiAoc3RhdCAmIE1HX1JFR19TVEFUVVNfQklUX1dSSVRF X0ZBVUxUKQorCQlwcmludGsoIldyaXRlRmF1bHQgIik7CisJaWYgKHN0YXQgJiBNR19SRUdfU1RB VFVTX0JJVF9TRUVLX0RPTkUpCisJCXByaW50aygiU2Vla0NvbXBsZXRlICIpOworCWlmIChzdGF0 ICYgTUdfUkVHX1NUQVRVU19CSVRfREFUQV9SRVEpCisJCXByaW50aygiRGF0YVJlcXVlc3QgIik7 CisJaWYgKHN0YXQgJiBNR19SRUdfU1RBVFVTX0JJVF9DT1JSRUNURURfRVJST1IpCisJCXByaW50 aygiQ29ycmVjdGVkRXJyb3IgIik7CisJaWYgKHN0YXQgJiBNR19SRUdfU1RBVFVTX0JJVF9FUlJP UikKKwkJcHJpbnRrKCJFcnJvciAiKTsKKwlwcmludGsoIn1cbiIpOworCWlmICgoc3RhdCAmIE1H X1JFR19TVEFUVVNfQklUX0VSUk9SKSA9PSAwKSB7CisJCWhvc3QtPmVycm9yID0gMDsKKwl9IGVs c2UgeworCQlob3N0LT5lcnJvciA9IGluYihob3N0LT5kZXZfYmFzZSArIE1HX1JFR19FUlJPUik7 CisJCXByaW50aygiJXM6ICVzOiBlcnJvcj0weCUwMnggeyAiLCBuYW1lLCBtc2csIGhvc3QtPmVy cm9yICYgMHhmZik7CisJCWlmIChob3N0LT5lcnJvciAmIE1HX1JFR19FUlJfQkJLKQorCQkJcHJp bnRrKCJCYWRTZWN0b3IgIik7CisJCWlmIChob3N0LT5lcnJvciAmIE1HX1JFR19FUlJfVU5DKQor CQkJcHJpbnRrKCJVbmNvcnJlY3RhYmxlRXJyb3IgIik7CisJCWlmIChob3N0LT5lcnJvciAmIE1H X1JFR19FUlJfSURORikKKwkJCXByaW50aygiU2VjdG9ySWROb3RGb3VuZCAiKTsKKwkJaWYgKGhv c3QtPmVycm9yICYgTUdfUkVHX0VSUl9BQlJUKQorCQkJcHJpbnRrKCJEcml2ZVN0YXR1c0Vycm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HX0RFVl9OQU1F LCBob3N0KTsKKwkJaWYgKGVycikgeworCQkJcHJpbnRrKEtFUk5fRVJSICIlczolZCBmYWlsIChy ZXF1ZXN0X2lycSBlcnI9JWQpXG4iLCBfX2Z1bmNfXywgX19MSU5FX18sIGVycik7CisJCQlnb3Rv IHByb2JlX2Vycl8zOworCQl9CisKKwl9CisKKwkvKiBnZXQgZGlzayBpZCAqLworCWVyciA9IG1n X2dldF9kaXNrX2lkKGhvc3QpOworCWlmIChlcnIpIHsKKwkJcHJpbnRrKEtFUk5fRVJSICIlczol ZCBmYWlsIChlcnIgY29kZSA6ICVkKVxuIiwgX19mdW5jX18sIF9fTElORV9fLCBlcnIpOworCQll cnIgPSAtRUlPOworCQlnb3RvIHByb2JlX2Vycl80OworCX0KKworCWVyciA9IHJlZ2lzdGVyX2Js a2Rldihob3N0LT5tYWpvciwgTUdfRElTS19OQU1FKTsKKwlpZiAoZXJyIDwgMCkgeworCQlwcmlu dGsoS0VSTl9FUlIgIiVzOiVkIChyZWdpc3Rlcl9ibGtkZXYpIGZhaWwgKGVyciBjb2RlIDogJWQp XG4iLCBfX2Z1bmNfXywgX19MSU5FX18sIGVycik7CisJCWdvdG8gcHJvYmVfZXJyXzQ7CisJfQor CWVyciA9IDA7CisJaWYgKCFob3N0LT5tYWpvcikKKwkJaG9zdC0+bWFqb3IgPSBlcnI7CisKKwlz cGluX2xvY2tfaW5pdCgmaG9zdC0+bG9jayk7CisKKwlpZiAocHJ2X2RhdGEtPnVzZV9wb2xsaW5n KSB7CisJCWhvc3QtPmJyZXEgPSBibGtfaW5pdF9xdWV1ZShtZ19yZXF1ZXN0X3BvbGwsICZob3N0 LT5sb2NrKTsKKwl9IGVsc2UgeworCQlob3N0LT5icmVxID0gYmxrX2luaXRfcXVldWUobWdfcmVx dWVzdCwgJmhvc3QtPmxvY2spOworCX0KKworCWlmICghaG9zdC0+YnJlcSkgeworCQllcnIgPSAt RU5PTUVNOworCQlwcmludGsoS0VSTl9FUlIgIi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2VuZGlzayhob3N0LT5nZCk7CisJCXB1dF9kaXNrKGhvc3QtPmdkKTsK Kwl9CisJLyogcmVtb3ZlIHF1ZXVlICovCisJaWYgKGhvc3QtPmJyZXEpCisJCWJsa19jbGVhbnVw X3F1ZXVlKGhvc3QtPmJyZXEpOworCisJLyogdW5yZWdpc3RlciBibGsgZGV2aWNlICovCisJdW5y ZWdpc3Rlcl9ibGtkZXYoaG9zdC0+bWFqb3IsIE1HX0RJU0tfTkFNRSk7CisKKwkvKiBmcmVlIGly cSAqLworCWlmICghcHJ2X2RhdGEtPnVzZV9wb2xsaW5nKQorCQlmcmVlX2lycShob3N0LT5pcnEs IGhvc3QpOworCisJLyogdW5tYXAgaW8gKi8KKwlpZiAoaG9zdC0+ZGV2X2Jhc2UpCisJCWlvdW5t YXAoKHZvaWQgX19pb21lbSAqKWhvc3QtPmRldl9iYXNlKTsKKworCS8qIGZyZWUgbWdfaG9zdCAq LworCWlmIChob3N0KQorCQlrZnJlZShob3N0KTsKKworCXJldHVybiBlcnI7Cit9CisKK3N0YXRp YyBzdHJ1Y3QgcGxhdGZvcm1fZHJpdmVyIG1nX2Rpc2tfZHJpdmVyID0geworCS5wcm9iZSA9IG1n X3Byb2JlLAorCS5yZW1vdmUgPSBtZ19yZW1vdmUsCisJLmRyaXZlciA9IHsKKwkJLm5hbWUgPSBN R19ERVZfTkFNRSwKKwkJLm93bmVyID0gVEhJU19NT0RVTEUsCisJfQorfTsKKworLyoqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioKKyAqCisgKiBNb2R1bGUgc3R1ZmYKKyAqCisgKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq Ki8KKworc3RhdGljIGludCBfX2luaXQgbWdfaW5pdCh2b2lkKQoreworCXByaW50ayhLRVJOX0lO Rk8gIm1HaW5lIG1mbGF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X18sIF9fTElORV9fLCAjI2FyZ3MpCisjZWxzZSAvKiBDT05G SUdfTUdfREVCVUcgKi8KKyMgIGRlZmluZSBNR19EQkcoZm10LCBhcmdzLi4uKSBkbyB7IH0gd2hp bGUgKDApCisjZW5kaWYgLyogQ09ORklHX01HX0RFQlVHICovCisKKyNlbmRpZgo= ------=_Part_22061_747101.1232439957065-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/