Skip to contentSkip to conversation

sparse errors in srcu.h

DISCUSSION Brice Goglin 2 participants 5 messages Dec 6, 2006 – Dec 7, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

When running sparse checks on a file that ends up including srcu.h, we get the following warnings:

include/linux/srcu.h:52:44: error: undefined identifier 'sp' include/linux/srcu.h:52:44: error: bad constant expression include/linux/srcu.h:53:56: error: undefined identifier 'sp' include/linux/srcu.h:53:56: error: bad constant expression

It seems to be caused by the following lines:

    int srcu_read_lock(struct srcu_struct *sp) __acquires(sp);
    void srcu_read_unlock(struct srcu_struct *sp, int idx) __releases(sp);

which come from the following commit.

commit 621934ee7ed5b073c7fd638b347e632c53572761
Author: Paul E. McKenney <[email protected]>
Date: Wed Oct 4 02:17:02 2006 -0700

[PATCH] srcu-3: RCU variant permitting read-side blocking

I was wondering if there is a way to fix those errors...

Thanks,
Brice

#1 lore raw
Quoted 17 lines · Brice Goglin

Hi,

When running sparse checks on a file that ends up including srcu.h, we get the following warnings:

include/linux/srcu.h:52:44: error: undefined identifier 'sp' include/linux/srcu.h:52:44: error: bad constant expression include/linux/srcu.h:53:56: error: undefined identifier 'sp' include/linux/srcu.h:53:56: error: bad constant expression

It seems to be caused by the following lines:

    int srcu_read_lock(struct srcu_struct *sp) __acquires(sp);
    void srcu_read_unlock(struct srcu_struct *sp, int idx) __releases(sp);

which come from the following commit.

Quoted 8 lines

commit 621934ee7ed5b073c7fd638b347e632c53572761
Author: Paul E. McKenney <[email protected]>
Date: Wed Oct 4 02:17:02 2006 -0700

[PATCH] srcu-3: RCU variant permitting read-side blocking

I was wondering if there is a way to fix those errors...

I believe that you need to update your version of sparse to 0.1. See http://lwn.net/Articles/208312/ for more info.

Thanx, Paul

#2 lore raw
Quoted 26 lines · Paul E. McKenney
Quoted 24 lines · Brice Goglin

Hi,

When running sparse checks on a file that ends up including srcu.h, we get the following warnings:

include/linux/srcu.h:52:44: error: undefined identifier 'sp' include/linux/srcu.h:52:44: error: bad constant expression include/linux/srcu.h:53:56: error: undefined identifier 'sp' include/linux/srcu.h:53:56: error: bad constant expression

It seems to be caused by the following lines:

    int srcu_read_lock(struct srcu_struct *sp) __acquires(sp);
    void srcu_read_unlock(struct srcu_struct *sp, int idx) __releases(sp);

which come from the following commit.

commit 621934ee7ed5b073c7fd638b347e632c53572761
Author: Paul E. McKenney <[email protected]>
Date: Wed Oct 4 02:17:02 2006 -0700

[PATCH] srcu-3: RCU variant permitting read-side blocking

Quoted 8 lines
Quoted 2 lines

I was wondering if there is a way to fix those errors...

I believe that you need to update your version of sparse to 0.1. See http://lwn.net/Articles/208312/ for more info.

Thanx, Paul

Right, thanks, I had an old version hidden in /usr/local, works fine now.

Brice

#3 lore raw
In reply to Paul E. McKenney
Quoted 26 lines · Paul E. McKenney
Quoted 24 lines · Brice Goglin

Hi,

When running sparse checks on a file that ends up including srcu.h, we get the following warnings:

include/linux/srcu.h:52:44: error: undefined identifier 'sp' include/linux/srcu.h:52:44: error: bad constant expression include/linux/srcu.h:53:56: error: undefined identifier 'sp' include/linux/srcu.h:53:56: error: bad constant expression

It seems to be caused by the following lines:

    int srcu_read_lock(struct srcu_struct *sp) __acquires(sp);
    void srcu_read_unlock(struct srcu_struct *sp, int idx) __releases(sp);

which come from the following commit.

commit 621934ee7ed5b073c7fd638b347e632c53572761
Author: Paul E. McKenney <[email protected]>
Date: Wed Oct 4 02:17:02 2006 -0700

[PATCH] srcu-3: RCU variant permitting read-side blocking

Quoted 8 lines
Quoted 2 lines

I was wondering if there is a way to fix those errors...

I believe that you need to update your version of sparse to 0.1. See http://lwn.net/Articles/208312/ for more info.

Thanx, Paul

Right, thanks, I had an old version hidden in /usr/local, works fine now.

Brice

#4 lore raw
In reply to Paul E. McKenney
Quoted 26 lines · Paul E. McKenney
Quoted 24 lines · Brice Goglin

Hi,

When running sparse checks on a file that ends up including srcu.h, we get the following warnings:

include/linux/srcu.h:52:44: error: undefined identifier 'sp' include/linux/srcu.h:52:44: error: bad constant expression include/linux/srcu.h:53:56: error: undefined identifier 'sp' include/linux/srcu.h:53:56: error: bad constant expression

It seems to be caused by the following lines:

    int srcu_read_lock(struct srcu_struct *sp) __acquires(sp);
    void srcu_read_unlock(struct srcu_struct *sp, int idx) __releases(sp);

which come from the following commit.

commit 621934ee7ed5b073c7fd638b347e632c53572761
Author: Paul E. McKenney <[email protected]>
Date: Wed Oct 4 02:17:02 2006 -0700

[PATCH] srcu-3: RCU variant permitting read-side blocking

Quoted 8 lines
Quoted 2 lines

I was wondering if there is a way to fix those errors...

I believe that you need to update your version of sparse to 0.1. See http://lwn.net/Articles/208312/ for more info.

Thanx, Paul

Right, thanks, I had an old version hidden in /usr/local, works fine now.

Brice