From: "Brigham Campbell" <me@brighamcampbell.com>
To: "Gero Schwäricke" <gero.schwaericke@sevenlab.de>,
"Brigham Campbell" <me@brighamcampbell.com>,
"Jean Delvare" <jdelvare@suse.de>,
linux-i2c@vger.kernel.org
Cc: "Wolfram Sang" <wsa+renesas@sang-engineering.com>
Subject: Re: [PATCH v4 1/2] i2c-tools: Allow passing device file paths
Date: Thu, 16 Jul 2026 08:17:55 -0600 [thread overview]
Message-ID: <DK026KAMHWFW.1R61HGD0MFI9B@brighamcampbell.com> (raw)
In-Reply-To: <DJY72ONUKYLD.3D0U14SM219BI@sevenlab.de>
Hi Gero,
On Tue Jul 14, 2026 at 3:42 AM MDT, Gero Schwäricke wrote:
> On Mon Jul 13, 2026 at 5:38 PM CEST, Brigham Campbell wrote:
>> Maybe it would be easier to understand an approach which simply
>> increases the size of the filename buffer to PATH_MAX from limits.h and
>> just copies the path directly into the buffer via strcpy? I had
>> considered this approach. In this case, I might consider moving the
>> (much bigger) buffer from the stack to the heap so as not to overrun the
>> stack frame...
>
> hm, simpler to understand indeed, but 4k is a significant allocation for
> smaller targets. I'm a bit torn. In the end both are valid options, but
> I think your implementation is fine as is. Maybe just add a comment why
> we assign the pointer instead of copying into the buffer, so the intent
> is made clear.
I'll keep it as-is and add a comment for the next revision, then.
>> I appreciate the feedback
>> I've received from you and Gero.
Woops, I meant to say you and Wolfram. I went backpacking last weekend.
Clearly, the Utah heat wave fried my brain!
--
Brigham Campbell
https://brighamcampbell.com
next prev parent reply other threads:[~2026-07-16 14:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 4:27 [PATCH v4 0/2] i2c-tools: Make tools accept bus path Brigham Campbell
2026-07-06 4:27 ` [PATCH v4 1/2] i2c-tools: Allow passing device file paths Brigham Campbell
2026-07-09 12:18 ` Wolfram Sang
2026-07-09 12:40 ` Gero Schwäricke
2026-07-11 19:24 ` Wolfram Sang
2026-07-13 9:23 ` Gero Schwäricke
2026-07-13 15:06 ` Wolfram Sang
2026-07-14 9:30 ` Gero Schwäricke
2026-07-14 10:13 ` Wolfram Sang
2026-07-16 14:49 ` Brigham Campbell
2026-07-17 13:00 ` Gero Schwäricke
2026-07-19 22:22 ` Brigham Campbell
2026-07-13 9:37 ` Gero Schwäricke
2026-07-13 15:38 ` Brigham Campbell
2026-07-14 9:42 ` Gero Schwäricke
2026-07-16 14:17 ` Brigham Campbell [this message]
2026-07-06 4:27 ` [PATCH v4 2/2] i2c-tools: Document device paths as I2CBUS arg Brigham Campbell
2026-07-11 19:43 ` Wolfram Sang
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=DK026KAMHWFW.1R61HGD0MFI9B@brighamcampbell.com \
--to=me@brighamcampbell.com \
--cc=gero.schwaericke@sevenlab.de \
--cc=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox