public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: thornber@redhat.com
To: device-mapper development <dm-devel@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [dm-devel] Announcement: STEC EnhanceIO SSD caching software for Linux kernel
Date: Wed, 16 Jan 2013 12:15:43 +0000	[thread overview]
Message-ID: <20130116121542.GB3869@raspberrypi> (raw)
In-Reply-To: <20130116104546.GA3869@raspberrypi>

On Wed, Jan 16, 2013 at 10:45:47AM +0000, thornber@redhat.com wrote:
> Hi Amit,
> 
> I'll look through EnhanceIO this week.

I just ran the code through sparse and it throws up a lot of warnings.
Most of these trivial; functions that should be declared static.  But
some are more concerning, like the 'different address spaces' ones.
If you're not sure how to fix the 'context imbalance' ones ping me and
I'll write a patch for you.

On another note I see linux_os.h and os.h.  Which contain things like:

#define SPIN_LOCK_INIT                  spin_lock_init
#define SPIN_LOCK_IRQSAVE(l, f)         spin_lock_irqsave(l, f)
#define SPIN_UNLOCK_IRQRESTORE(l, f)    spin_unlock_irqrestore(l, f)
#define SPIN_LOCK_IRQSAVE_FLAGS(l)      do { long unsigned int f; spin_lock_irqsave(l, f); *(l##_flags) = f; }\
 while (0)
#define SPIN_UNLOCK_IRQRESTORE_FLAGS(l) do { long unsigned int f = *(l##_flags); spin_unlock_irqrestore(l, f);\
 } while (0)

You wont get the code upstream if it has an OS abstraction layer like
this.  Other people have tried.

- Joe


drivers/block/enhanceio/eio_ioctl.c:50:52: warning: incorrect type in argument 2 (different address spaces)
drivers/block/enhanceio/eio_ioctl.c:50:52:    expected void const [noderef] <asn:1>*from
drivers/block/enhanceio/eio_ioctl.c:50:52:    got struct cache_rec_short [usertype] *<noident>
drivers/block/enhanceio/eio_ioctl.c:70:52: warning: incorrect type in argument 2 (different address spaces)
drivers/block/enhanceio/eio_ioctl.c:70:52:    expected void const [noderef] <asn:1>*from
drivers/block/enhanceio/eio_ioctl.c:70:52:    got struct cache_rec_short [usertype] *<noident>
drivers/block/enhanceio/eio_ioctl.c:86:52: warning: incorrect type in argument 2 (different address spaces)
drivers/block/enhanceio/eio_ioctl.c:86:52:    expected void const [noderef] <asn:1>*from
drivers/block/enhanceio/eio_ioctl.c:86:52:    got struct cache_rec_short [usertype] *<noident>
drivers/block/enhanceio/eio_ioctl.c:99:43: warning: incorrect type in argument 1 (different address spaces)
drivers/block/enhanceio/eio_ioctl.c:99:43:    expected void [noderef] <asn:1>*dst
drivers/block/enhanceio/eio_ioctl.c:99:43:    got unsigned long long [usertype] *<noident>
drivers/block/enhanceio/eio_ioctl.c:118:52: warning: incorrect type in argument 2 (different address spaces)
drivers/block/enhanceio/eio_ioctl.c:118:52:    expected void const [noderef] <asn:1>*from
drivers/block/enhanceio/eio_ioctl.c:118:52:    got struct cache_rec_short [usertype] *<noident>
drivers/block/enhanceio/eio_ioctl.c:134:52: warning: incorrect type in argument 2 (different address spaces)
drivers/block/enhanceio/eio_ioctl.c:134:52:    expected void const [noderef] <asn:1>*from
drivers/block/enhanceio/eio_ioctl.c:134:52:    got struct cache_rec_short [usertype] *<noident>
  CC      drivers/block/enhanceio/eio_ioctl.o
drivers/block/enhanceio/eio_conf.c:47:16: warning: symbol 'cache_list_head' was not declared. Should it be sta\
tic?
drivers/block/enhanceio/eio_conf.c:48:20: warning: symbol '_kcached_wq' was not declared. Should it be static?
drivers/block/enhanceio/eio_conf.c:50:19: warning: symbol '_job_cache' was not declared. Should it be static?
drivers/block/enhanceio/eio_conf.c:51:19: warning: symbol '_io_cache' was not declared. Should it be static?
drivers/block/enhanceio/eio_conf.c:52:11: warning: symbol '_job_pool' was not declared. Should it be static?
drivers/block/enhanceio/eio_conf.c:53:11: warning: symbol '_io_pool' was not declared. Should it be static?
drivers/block/enhanceio/eio_conf.c:55:10: warning: symbol 'nr_cache_jobs' was not declared. Should it be stati\
c?
drivers/block/enhanceio/eio_conf.c:59:1: warning: symbol 'ssd_rm_list' was not declared. Should it be static?
drivers/block/enhanceio/eio_conf.c:60:5: warning: symbol 'ssd_rm_list_not_empty' was not declared. Should it b\
e static?
drivers/block/enhanceio/eio_conf.c:61:12: warning: symbol 'ssd_rm_list_lock' was not declared. Should it be st\
atic?
drivers/block/enhanceio/eio_conf.c:63:22: warning: symbol 'eio_control' was not declared. Should it be static?
drivers/block/enhanceio/eio_conf.c:65:5: warning: symbol 'eio_force_warm_boot' was not declared. Should it be \
static?
drivers/block/enhanceio/eio_conf.c:2101:1: warning: symbol 'eio_status_info' was not declared. Should it be st\
atic?
drivers/block/enhanceio/eio_conf.c:2446:1: warning: symbol 'eio_init' was not declared. Should it be static?
drivers/block/enhanceio/eio_conf.c:2494:1: warning: symbol 'eio_exit' was not declared. Should it be static?
  CC      drivers/block/enhanceio/eio_conf.o
drivers/block/enhanceio/eio_main.c:3157:53: warning: Using plain integer as NULL pointer
drivers/block/enhanceio/eio_main.c:1095:34: warning: Using plain integer as NULL pointer
drivers/block/enhanceio/eio_main.c:1392:33: warning: Using plain integer as NULL pointer
drivers/block/enhanceio/eio_main.c:141:1: warning: symbol 'eio_io_async_pages' was not declared. Should it be \
static?
drivers/block/enhanceio/eio_main.c:171:1: warning: symbol 'eio_io_async_bvec' was not declared. Should it be s\
tatic?
drivers/block/enhanceio/eio_main.c:275:1: warning: symbol 'eio_disk_io_callback' was not declared. Should it b\
e static?
drivers/block/enhanceio/eio_main.c:359:1: warning: symbol 'eio_io_callback' was not declared. Should it be sta\
tic?
drivers/block/enhanceio/eio_main.c:3103:16: warning: symbol 'setup_bio_vecs' was not declared. Should it be st\
atic?
  CHECK   drivers/block/enhanceio/eio_mem.c
drivers/block/enhanceio/eio_main.c:1399:9: warning: context imbalance in 'eio_enq_mdupdate' - different lock c\
ontexts for basic block
drivers/block/enhanceio/eio_policy.c:25:1: warning: symbol 'eio_policy_list' was not declared. Should it be st\
atic?
  CC      drivers/block/enhanceio/eio_policy.o
  CHECK   drivers/block/enhanceio/eio_setlru.c
drivers/block/enhanceio/eio_procfs.c:56:1: warning: symbol 'eio_zerostats_sysctl' was not declared. Should it \
be static?
drivers/block/enhanceio/eio_procfs.c:120:1: warning: symbol 'eio_mem_limit_pct_sysctl' was not declared. Shoul\
d it be static?
drivers/block/enhanceio/eio_procfs.c:164:1: warning: symbol 'eio_error_inject_sysctl' was not declared. Should\
 it be static?
drivers/block/enhanceio/eio_procfs.c:186:1: warning: symbol 'eio_clean_sysctl' was not declared. Should it be \
static?
drivers/block/enhanceio/eio_procfs.c:263:1: warning: symbol 'eio_dirty_high_threshold_sysctl' was not declared\
. Should it be static?
drivers/block/enhanceio/eio_procfs.c:338:1: warning: symbol 'eio_dirty_low_threshold_sysctl' was not declared.\
 Should it be static?
drivers/block/enhanceio/eio_procfs.c:419:1: warning: symbol 'eio_dirty_set_high_threshold_sysctl' was not decl\
ared. Should it be static?
drivers/block/enhanceio/eio_procfs.c:497:1: warning: symbol 'eio_dirty_set_low_threshold_sysctl' was not decla\
red. Should it be static?
drivers/block/enhanceio/eio_procfs.c:582:1: warning: symbol 'eio_autoclean_threshold_sysctl' was not declared.\
 Should it be static?       
drivers/block/enhanceio/eio_procfs.c:651:1: warning: symbol 'eio_time_based_clean_interval_sysctl' was not dec\
lared. Should it be static?
drivers/block/enhanceio/eio_procfs.c:734:1: warning: symbol 'eio_control_sysctl' was not declared. Should it b\
e static?
drivers/block/enhanceio/eio_procfs.c:1276:11: warning: symbol 'invalidate_spin_lock_flags' was not declared. S\
hould it be static?
  CC      drivers/block/enhanceio/eio_procfs.o
  CC      drivers/block/enhanceio/eio_setlru.o
  CHECK   drivers/block/enhanceio/eio_subr.c
drivers/block/enhanceio/eio_subr.c:34:11: warning: symbol '_job_lock_flags' was not declared. Should it be sta\
tic?
drivers/block/enhanceio/eio_subr.c:40:1: warning: symbol '_io_jobs' was not declared. Should it be static?
drivers/block/enhanceio/eio_subr.c:41:1: warning: symbol '_disk_read_jobs' was not declared. Should it be stat\
ic?
drivers/block/enhanceio/eio_subr.c:74:20: warning: symbol 'eio_pop' was not declared. Should it be static?
drivers/block/enhanceio/eio_subr.c:92:1: warning: symbol 'eio_push' was not declared. Should it be static?
drivers/block/enhanceio/eio_subr.c:110:1: warning: symbol 'eio_push_io' was not declared. Should it be static?
drivers/block/enhanceio/eio_subr.c:216:1: warning: symbol 'eio_sync_endio' was not declared. Should it be stat\
ic?
  CC      drivers/block/enhanceio/eio_subr.o
  CHECK   drivers/block/enhanceio/eio_ttc.c
  CHECK   drivers/block/enhanceio/eio_fifo.c
drivers/block/enhanceio/eio_ttc.c:89:24: warning: non-ANSI function declaration of function 'eio_create_misc_d\
evice'
drivers/block/enhanceio/eio_ttc.c:95:24: warning: non-ANSI function declaration of function 'eio_delete_misc_d\
evice'
drivers/block/enhanceio/eio_ttc.c:34:25: warning: symbol 'eio_ttc_lock' was not declared. Should it be static?
drivers/block/enhanceio/eio_ttc.c:37:5: warning: symbol 'eio_reboot_notified' was not declared. Should it be s\
tatic?
drivers/block/enhanceio/eio_ttc.c:520:39: warning: incorrect type in argument 2 (different address spaces)
drivers/block/enhanceio/eio_ttc.c:520:39:    expected void const [noderef] <asn:1>*from
drivers/block/enhanceio/eio_ttc.c:520:39:    got struct cache_list [usertype] *<noident>
drivers/block/enhanceio/eio_ttc.c:550:27: warning: incorrect type in argument 1 (different address spaces)
drivers/block/enhanceio/eio_ttc.c:550:27:    expected void [noderef] <asn:1>*dst
drivers/block/enhanceio/eio_ttc.c:550:27:    got char *<noident>
drivers/block/enhanceio/eio_ttc.c:556:27: warning: incorrect type in argument 1 (different address spaces)
drivers/block/enhanceio/eio_ttc.c:556:27:    expected void [noderef] <asn:1>*dst
drivers/block/enhanceio/eio_ttc.c:556:27:    got struct cache_list [usertype] *<noident>
drivers/block/enhanceio/eio_ttc.c:642:6: warning: symbol 'eio_dec_count' was not declared. Should it be static\
?
drivers/block/enhanceio/eio_ttc.c:663:6: warning: symbol 'eio_endio' was not declared. Should it be static?
drivers/block/enhanceio/eio_ttc.c:675:5: warning: symbol 'eio_dispatch_io_pages' was not declared. Should it b\
e static?
drivers/block/enhanceio/eio_ttc.c:737:5: warning: symbol 'eio_dispatch_io' was not declared. Should it be stat\
ic?
drivers/block/enhanceio/eio_ttc.c:796:5: warning: symbol 'eio_async_io' was not declared. Should it be static?
drivers/block/enhanceio/eio_ttc.c:843:5: warning: symbol 'eio_sync_io' was not declared. Should it be static?
  CC      drivers/block/enhanceio/eio_ttc.o
drivers/block/enhanceio/eio_fifo.c:55:26: warning: symbol 'eio_fifo_ops' was not declared. Should it be static\
?
  CC      drivers/block/enhanceio/eio_fifo.o
  CHECK   drivers/block/enhanceio/eio_lru.c
drivers/block/enhanceio/eio_lru.c:59:16: warning: symbol 'eio_lru' was not declared. Should it be static?
drivers/block/enhanceio/eio_lru.c:67:26: warning: symbol 'eio_lru_ops' was not declared. Should it be static?
  CC      drivers/block/enhanceio/eio_lru.o
  LD      drivers/block/enhanceio/enhanceio.o

  reply	other threads:[~2013-01-16 12:15 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11 17:18 Announcement: STEC EnhanceIO SSD caching software for Linux kernel Amit Kale
2013-01-11 22:36 ` Marcin Slusarz
2013-01-14 21:46 ` Mike Snitzer
2013-01-15 13:19   ` Amit Kale
2013-01-16 10:45     ` [dm-devel] " thornber
2013-01-16 12:15       ` thornber [this message]
2013-01-16 16:58       ` thornber
2013-01-17  9:52       ` Amit Kale
2013-01-17 11:39         ` Kent Overstreet
2013-01-17 17:17           ` Amit Kale
2013-01-24 23:45           ` Kent Overstreet
2013-01-17 13:26         ` thornber
2013-01-17 17:53           ` Amit Kale
2013-01-17 18:36             ` Jason Warr
2013-01-18  9:08               ` Amit Kale
2013-01-18 15:56                 ` Jason Warr
2013-01-18 16:11                   ` thornber
2013-01-18 16:45                     ` Jason Warr
2013-01-18 17:42                       ` thornber
2013-01-18 17:44                       ` Amit Kale
2013-01-18 18:36                         ` Jason Warr
2013-01-18 21:25                           ` [LSF/MM TOPIC] " Darrick J. Wong
2013-01-18 21:37                             ` Mike Snitzer
2013-01-21  5:26                               ` Amit Kale
2013-01-21 13:09                                 ` Mike Snitzer
2013-01-21 13:58                                   ` thornber
2013-01-22  5:00                                   ` Amit Kale
2013-02-04 20:33                               ` Kent Overstreet
2013-01-18 16:12                   ` Amit Kale
2013-01-24 23:55                 ` Kent Overstreet
2013-01-17 18:50             ` thornber
2013-01-18  7:03               ` Amit Kale
2013-01-18 14:43       ` thornber
2013-01-30 12:36 ` Pavel Machek
2013-01-30 19:56   ` Amit Kale

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=20130116121542.GB3869@raspberrypi \
    --to=thornber@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=snitzer@redhat.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