Prev: [PATCH 0/3 RFCv4] add support for Janz MODULbus devices
Next: [PATCH] staging/dt3155: sparse cleanup of allocator code
From: Andrew Morton on 2 Mar 2010 16:40 On Fri, 26 Feb 2010 19:39:32 +0100 Nicolas Ferre <nicolas.ferre(a)atmel.com> wrote: > + kunmap_atomic(((void *)sgbuffer)-sg->offset, KM_BIO_SRC_IRQ); It's a feature of kunmap_atomic() that it will accept a pointer to any location in the page. So the subtraction isn't strictly needed. And if the subtraction is removed, the (void*) cast can also be removed. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Wolfgang Mües on 3 Mar 2010 02:40
Hi Andrew, Am Dienstag, 2. M�rz 2010 schrieb Andrew Morton: > Nicolas Ferre <nicolas.ferre(a)atmel.com> wrote: > > + kunmap_atomic(((void *)sgbuffer)-sg->offset, KM_BIO_SRC_IRQ); > > It's a feature of kunmap_atomic() that it will accept a pointer to any > location in the page. So the subtraction isn't strictly needed. > > And if the subtraction is removed, the (void*) cast can also be removed. I did not know this. Thank you for pointing this out. So this part of the patch (which was purely cosmetic because I have seen no error without the subtraction) can be omitted. best regards i. A. Wolfgang M�es -- Auerswald Gesellschaft f�r Datensysteme mbH Hardware Development Telefon: +49 (0)5306 9219 562 Telefax: +49 (0)5306 9219 94 E-Mail: Wolfgang.Mues(a)Auerswald.de Web: http://www.auerswald.de -------------------------------------------------------------- Auerswald Gesellschaft f�r Datensysteme mbH Vor den Grash�fen 1, 38162 Cremlingen Registriert beim AG Braunschweig HRB 7499 Gesch�ftsf�hrer: Dipl-Ing. Gerhard Auerswald -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |