Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1365081
| From | "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 24/31] mtd: use parity16 in sm_ftl.c |
| Date | 2016-03-27 09:40 +0200 |
| Message-ID | <rhdsK-4V4-9@gated-at.bofh.it> (permalink) |
| References | <rg3ON-4FE-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> --- drivers/mtd/sm_ftl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c index b096f8b..2244588 100644 --- a/drivers/mtd/sm_ftl.c +++ b/drivers/mtd/sm_ftl.c @@ -136,7 +136,7 @@ static int sm_get_lba(uint8_t *lba) return -2; /* check parity - endianness doesn't matter */ - if (hweight16(*(uint16_t *)lba) & 1) + if (parity16(*(uint16_t *)lba)) return -2; return (lba[1] >> 1) | ((lba[0] & 0x07) << 7); @@ -183,7 +183,7 @@ static void sm_write_lba(struct sm_oob *oob, uint16_t lba) tmp[0] = 0x10 | ((lba >> 7) & 0x07); tmp[1] = (lba << 1) & 0xFF; - if (hweight16(*(uint16_t *)tmp) & 0x01) + if (parity16(*(uint16_t *)tmp)) tmp[1] |= 1; oob->lba_copy1[0] = oob->lba_copy2[0] = tmp[0]; -- 2.5.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 01/31] bitops: add parity functions Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com> - 2016-03-24 04:10 +0100
Re: [PATCH 01/31] bitops: add parity functions Denys Vlasenko <dvlasenk@redhat.com> - 2016-03-24 09:40 +0100
Re: [PATCH 01/31] bitops: add parity functions Andrew Morton <akpm@linux-foundation.org> - 2016-03-24 23:30 +0100
Re: [PATCH 01/31] bitops: add parity functions Martin Kepplinger <martink@posteo.de> - 2016-03-26 23:10 +0100
Re: [PATCH 01/31] bitops: add parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 10:00 +0200
Re: [PATCH 01/31] bitops: add parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 05:40 +0200
Re: [PATCH 01/31] bitops: add parity functions Sam Ravnborg <sam@ravnborg.org> - 2016-03-27 14:50 +0200
Re: [PATCH 01/31] bitops: add parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 15:40 +0200
Re: [PATCH 01/31] bitops: add parity functions Sam Ravnborg <sam@ravnborg.org> - 2016-03-27 20:00 +0200
Re: [PATCH 01/31] bitops: add parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-03-28 04:50 +0200
Re: [PATCH 01/31] bitops: add parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-03-28 04:20 +0200
Re: [PATCH 01/31] bitops: add parity functions Sam Ravnborg <sam@ravnborg.org> - 2016-03-28 09:00 +0200
Re: [PATCH 01/31] bitops: add parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-03-29 04:30 +0200
Re: [PATCH 01/31] bitops: add parity functions Joe Perches <joe@perches.com> - 2016-03-29 05:00 +0200
[PATCH 02/31] Include generic parity.h in some architectures' bitops.h "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 06:10 +0200
[PATCH 03/31] Add alpha-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 07:50 +0200
Re: [PATCH 03/31] Add alpha-specific parity functions Richard Henderson <rth@twiddle.net> - 2016-03-28 20:40 +0200
[PATCH 04/31] Add avr32-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 07:50 +0200
Re: [PATCH 04/31] Add avr32-specific parity functions Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> - 2016-03-28 22:10 +0200
[PATCH 05/31] Add blackfin-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:00 +0200
[PATCH 07/31] Add mips-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:10 +0200
Re: [PATCH 07/31] Add mips-specific parity functions David Daney <ddaney.cavm@gmail.com> - 2016-03-28 19:30 +0200
Re: [PATCH 07/31] Add mips-specific parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-03-29 04:20 +0200
[PATCH 06/31] Add ia64-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:10 +0200
[PATCH 08/31] Add tile-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:20 +0200
[PATCH 09/31] Add powerpc-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:40 +0200
[PATCH 11/31] Add x86-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:50 +0200
Re: [PATCH 11/31] Add x86-specific parity functions One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-03-29 14:20 +0200
[PATCH 10/31] Add sparc-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:50 +0200
Re: [PATCH 10/31] Add sparc-specific parity functions David Miller <davem@davemloft.net> - 2016-03-28 04:50 +0200
Re: [PATCH 10/31] Add sparc-specific parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-03-28 07:50 +0200
Re: [PATCH 10/31] Add sparc-specific parity functions David Miller <davem@davemloft.net> - 2016-03-28 17:30 +0200
Re: [PATCH 10/31] Add sparc-specific parity functions Sam Ravnborg <sam@ravnborg.org> - 2016-03-28 17:40 +0200
Re: [PATCH 10/31] Add sparc-specific parity functions David Miller <davem@davemloft.net> - 2016-03-28 17:50 +0200
[PATCH 12/31] sunrpc: auth_gss: use parity8 "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:00 +0200
[PATCH 13/31] mips: use parity functions in cerr-sb1.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:00 +0200
[PATCH 15/31] media: use parity8 in vivid-vbi-gen.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:10 +0200
[PATCH 14/31] lib: bch: use parity32 "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:10 +0200
[PATCH 17/31] input: joystick: use parity32 in grip_mp.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:20 +0200
[PATCH 18/31] input: joystick: use parity64 in sidewinder.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:20 +0200
[PATCH 16/31] media: saa7115: use parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:20 +0200
[PATCH 19/31] input: serio: use parity16 in ams_delta_serio.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:20 +0200
[PATCH 22/31] mtd: use parity functions in inftlcore.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:30 +0200
[PATCH 21/31] mtd: use parity16 in ssfdc.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:30 +0200
Re: [PATCH 21/31] mtd: use parity16 in ssfdc.c Brian Norris <computersforpeace@gmail.com> - 2016-04-02 01:50 +0200
[PATCH 20/31] scsi: use parity32 in isci/phy.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:30 +0200
[PATCH 26/31] input: serio: use parity8 in pcips2.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:40 +0200
[PATCH 25/31] ethernet: use parity8 in sun/niu.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:40 +0200
Re: [PATCH 25/31] ethernet: use parity8 in sun/niu.c Michal Nazarewicz <mina86@mina86.com> - 2016-03-28 16:40 +0200
[PATCH 24/31] mtd: use parity16 in sm_ftl.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:40 +0200
[PATCH 23/31] crypto: qat: use parity functions in qat_hal.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:40 +0200
[PATCH 28/31] iio: gyro: use parity32 in adxrs450.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:50 +0200
Re: [PATCH 28/31] iio: gyro: use parity32 in adxrs450.c Jonathan Cameron <jic23@kernel.org> - 2016-03-28 10:40 +0200
Re: [PATCH 28/31] iio: gyro: use parity32 in adxrs450.c Lars-Peter Clausen <lars@metafoo.de> - 2016-03-28 11:30 +0200
[PATCH 29/31] serial: use parity32 in max3100.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:50 +0200
[PATCH 30/31] input: mouse: use parity8 in elantech "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:50 +0200
[PATCH 27/31] input: serio: use parity8 in sa1111ps2.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:50 +0200
[PATCH 31/31] ethernet: broadcom: use parity8 in tg3.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 10:00 +0200
csiph-web