From: Akira shimahara <akira215corp@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: zbr@ioremap.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/9] w1_therm: fix reset_select_slave at beginning of search process
Date: Tue, 05 May 2020 23:06:32 +0200 [thread overview]
Message-ID: <868327e3af1d7ba2e2adfe7209f77a25a1cd1226.camel@gmail.com> (raw)
In-Reply-To: <20200505144900.GE838641@kroah.com>
Le mardi 05 mai 2020 à 16:49 +0200, Greg KH a écrit :
> > /*------------------------Hardware Functions---------------------
> > -----*/
> >
> > +/* Safe version of reser_select_slave - avoid using the one in
> > w_io.c */
> > +static int reset_select_slave(struct w1_slave *sl)
> > +{
> > + u8 match[9] = { W1_MATCH_ROM, };
> > + u64 rn = le64_to_cpu(*((u64 *)&sl->reg_num));
> > +
> > + if (w1_reset_bus(sl->master))
> > + return -ENODEV;
> > +
> > + memcpy(&match[1], &rn, 8);
> > + w1_write_block(sl->master, match, 9);
> > +
> > + return 0;
> > +}
>
>
> If you put this higher up in the .c file, no function definition is
>
> needed in the .h file at all, right?
>
>
>
> thanks,
>
>
>
> greg k-h
Yes, everything could be put in the .c file, but I think we will loose
clarity.
Please, let me know what you prefer.
Thanks
Akira Shimahara
prev parent reply other threads:[~2020-05-05 21:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 22:59 Akira Shimahara
2020-05-05 14:49 ` Greg KH
2020-05-05 21:06 ` Akira shimahara [this message]
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=868327e3af1d7ba2e2adfe7209f77a25a1cd1226.camel@gmail.com \
--to=akira215corp@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zbr@ioremap.net \
/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
all inboxes | Powered by JetHome®