From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: (max1111) Avoid extra memory
Date: Tue, 12 Jul 2011 17:20:17 +0000 [thread overview]
Message-ID: <20110712172017.GA25577@ericsson.com> (raw)
In-Reply-To: <20110712110152.4eead147@endymion.delvare>
On Tue, Jul 12, 2011 at 12:45:22PM -0400, Jean Delvare wrote:
> On Tue, 12 Jul 2011 09:40:33 -0700, Guenter Roeck wrote:
> > On Tue, Jul 12, 2011 at 05:01:52AM -0400, Jean Delvare wrote:
> > > We can allocate the tx and rx buffers as part of our data structure.
> > > Doing so is faster and spares memory.
> > >
> > > Signed-off-by: Jean Delvare <khali@linux-fr.org>
> > > ---
> > > Can anyone with a MAX1111 device try and report please?
> > >
> > Reason for using allocated buffers may have been to ensure (word/cache line) alignment.
> > Not really sure if that is a valid argument with 1/2 byte buffers, though.
>
> And such an alignment would belong to the bus driver rather than the
> SPI device driver. At least this is the way we do it for I2C...
>
Possibly, and makes sense (how does the device driver know ?), but for USB
they had me do it in the I2C master driver ... I ensured alignment by placing
the buffers at the beginning of the allocated memory.
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2011-07-12 17:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-12 9:01 [lm-sensors] [PATCH] hwmon: (max1111) Avoid extra memory allocations Jean Delvare
2011-07-12 16:40 ` [lm-sensors] [PATCH] hwmon: (max1111) Avoid extra memory Guenter Roeck
2011-07-12 16:45 ` Jean Delvare
2011-07-12 17:20 ` Guenter Roeck [this message]
2011-07-12 20:43 ` Stanislav Brabec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110712172017.GA25577@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.