From: Sudeep Dutt <sudeep.dutt@intel.com>
To: Joe Perches <joe@perches.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
Fengguang Wu <fengguang.wu@intel.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Nikhil Rao <nikhil.rao@intel.com>,
Ashutosh Dixit <ashutosh.dixit@intel.com>,
Dasaratharaman Chandramouli
<dasaratharaman.chandramouli@intel.com>,
Harshavardhan R Kharche <harshavardhan.r.kharche@intel.com>,
"Yaozu (Eddie) Dong" <eddie.dong@intel.com>,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
Sudeep Dutt <sudeep.dutt@intel.com>
Subject: Re: [PATCH char-misc-next 0/5] misc: mic: driver cleanups and a build fix.
Date: Fri, 27 Sep 2013 11:14:24 -0700 [thread overview]
Message-ID: <1380305664.75427.13.camel@blbiskey-desk1.amr.corp.intel.com> (raw)
In-Reply-To: <1380302964.17366.125.camel@joe-AO722>
On Fri, 2013-09-27 at 10:29 -0700, Joe Perches wrote:
> On Fri, 2013-09-27 at 09:49 -0700, Sudeep Dutt wrote:
> > These patches address code review feedback received on the
> > patch series @ https://lkml.org/lkml/2013/9/5/561 ,from:
> > a) Greg Kroah-Hartman on sysfs and header file cleanups.
> > b) Joe Perches on issues found by "--strict" checkpatch.
> >
> > It should also fix the build failures on certain non X86
> > architectures, reported in linux-next and 0-DAY builds.
> >
> > Ashutosh Dixit (1):
> > misc: mic: cleanups for "--strict" checkpatch.
> >
> > Sudeep Dutt (4):
> > misc: mic: host driver sysfs cleanups.
> > misc: mic: header file cleanups.
> > misc: mic: fix a warning in the IOCTL header file.
> > misc: mic: depend on X86 for both host and card drivers.
> >
> > Documentation/mic/mpssd/mpssd.c | 65 +++++++--------
> > Documentation/mic/mpssd/sysfs.c | 4 +-
>
> Why are these in Documentation/ at all?
> Shouldn't the directory be moved to tools/ ?
>
Currently, this is just sample working code for configuring MIC devices.
The longer term plan is to move this code to tools/ but not with this
patch series.
> It doesn't build normally btw.
>
> Also, there are some defects/shortcomings here:
>
We will post a follow up patch incorporating the changes below next
week. It would be great if this cleanup series is applied to
char-misc-next as is since patch 5 should fix a linux-next build failure
with powerpc.
Thanks for the review!
Sudeep Dutt
> Documentation/mic/mpssd/mpssd.c | 7 ++++---
> Documentation/mic/mpssd/mpssd.h | 1 +
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c
> index 8064804..cb62663 100644
> --- a/Documentation/mic/mpssd/mpssd.c
> +++ b/Documentation/mic/mpssd/mpssd.c
> @@ -379,7 +379,7 @@ disp_iovec(struct mic_info *mic, struct mic_copy_desc *copy,
> for (i = 0; i < copy->iovcnt; i++)
> mpsslog("%s %s %d copy->iov[%d] addr %p len 0x%lx\n",
> mic->name, s, line, i,
> - copy->iov[i].iov_base, copy->iov[i].iov_len);
> + copy->iov[i].iov_base, (long)copy->iov[i].iov_len);
> }
>
> static inline __u16 read_avail_idx(struct mic_vring *vr)
> @@ -953,7 +953,8 @@ set_backend_file(struct mic_info *mic)
> return false;
> mic->mic_virtblk.backend_file = malloc(strlen(evv) + 1);
> if (mic->mic_virtblk.backend_file == NULL) {
> - mpsslog("can't allocate memory\n", mic->name, mic->id);
> + mpsslog("%s id %d - can't allocate memory\n",
> + mic->name, mic->id);
> return false;
> }
> strcpy(mic->mic_virtblk.backend_file, evv + 1);
> @@ -1026,7 +1027,7 @@ close_backend(struct mic_info *mic)
> static bool
> start_virtblk(struct mic_info *mic, struct mic_vring *vring)
> {
> - if (((__u64)&virtblk_dev_page.blk_config % 8) != 0) {
> + if (((__u64)(unsigned long)&virtblk_dev_page.blk_config % 8) != 0) {
> mpsslog("%s: blk_config is not 8 byte aligned.\n",
> mic->name);
> return false;
> diff --git a/Documentation/mic/mpssd/mpssd.h b/Documentation/mic/mpssd/mpssd.h
> index b6dee38..ccd589f 100644
> --- a/Documentation/mic/mpssd/mpssd.h
> +++ b/Documentation/mic/mpssd/mpssd.h
> @@ -94,6 +94,7 @@ struct mic_info {
> struct mic_info *next;
> };
>
> +__attribute__((format(printf, 1, 2)))
> void mpsslog(char *format, ...);
> char *readsysfs(char *dir, char *entry);
> int setsysfs(char *dir, char *entry, char *value);
>
>
prev parent reply other threads:[~2013-09-27 18:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 16:49 [PATCH char-misc-next 0/5] misc: mic: driver cleanups and a build fix Sudeep Dutt
2013-09-27 16:49 ` [PATCH char-misc-next 1/5] misc: mic: host driver sysfs cleanups Sudeep Dutt
2013-09-27 16:49 ` [PATCH char-misc-next 2/5] misc: mic: header file cleanups Sudeep Dutt
2013-09-27 16:49 ` [PATCH char-misc-next 3/5] misc: mic: cleanups for "--strict" checkpatch Sudeep Dutt
2013-09-27 16:50 ` [PATCH char-misc-next 4/5] misc: mic: fix a warning in the IOCTL header file Sudeep Dutt
2013-09-27 16:50 ` [PATCH char-misc-next 5/5] misc: mic: depend on X86 for both host and card drivers Sudeep Dutt
2013-09-27 17:29 ` [PATCH char-misc-next 0/5] misc: mic: driver cleanups and a build fix Joe Perches
2013-09-27 18:14 ` Sudeep Dutt [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=1380305664.75427.13.camel@blbiskey-desk1.amr.corp.intel.com \
--to=sudeep.dutt@intel.com \
--cc=arnd@arndb.de \
--cc=ashutosh.dixit@intel.com \
--cc=dasaratharaman.chandramouli@intel.com \
--cc=eddie.dong@intel.com \
--cc=fengguang.wu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=harshavardhan.r.kharche@intel.com \
--cc=joe@perches.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikhil.rao@intel.com \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).