From: Junho Lee <tot0roprog@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: Sharing functions that parse configs in src/main.c to the mesh module
Date: Tue, 27 Aug 2024 16:19:43 +0900 [thread overview]
Message-ID: <66cd7e10.170a0220.c4108.dd07@mx.google.com> (raw)
Hi,
While reviewing the code to add new Mesh States to mesh/mesh-main.conf,
I noticed the following issues:
The parse_settings() function in mesh/mesh.c, the existing configs
parsing function, has many duplicate lines and is not well separated.
On the other hand, the parse-related functions in src/main.c are well
separated in the same structure. I think this code could be reused to
improve the mesh conf parsing function.
Rather than duplicate implementations of similar code, I would like to
ask for feedback on whether it would be better to isolate the reusable
lines in the src/shared/ directory and make them available in
mesh/mesh.c as well. It would not be necessary to move all the prefix
parse_ functions in src/main.c, just the prefix prase_config_ that
parses the data type. I would like to ask if this would break the bluez
semantics.
Regards,
Junho Lee
reply other threads:[~2024-08-27 7:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=66cd7e10.170a0220.c4108.dd07@mx.google.com \
--to=tot0roprog@gmail.com \
--cc=linux-bluetooth@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox