• Randy Dunlap's avatar
    s390/net: lcs: use IS_ENABLED() for kconfig detection · 12827233
    Randy Dunlap authored
    When CONFIG_ETHERNET=m or CONFIG_FDDI=m, lcs.s has build errors or
    warnings:
    
    ../drivers/s390/net/lcs.c:40:2: error: #error Cannot compile lcs.c without some net devices switched on.
       40 | #error Cannot compile lcs.c without some net devices switched on.
    ../drivers/s390/net/lcs.c: In function 'lcs_startlan_auto':
    ../drivers/s390/net/lcs.c:1601:13: warning: unused variable 'rc' [-Wunused-variable]
     1601 |         int rc;
    
    Solve this by using IS_ENABLED(CONFIG_symbol) instead of ifdef
    CONFIG_symbol. The latter only works for builtin (=y) values
    while IS_ENABLED() works for builtin or modular values.
    Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
    Cc: Alexandra Winter <wintera@linux.ibm.com>
    Cc: Wenjia Zhang <wenjia@linux.ibm.com>
    Cc: linux-s390@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: Heiko Carstens <hca@linux.ibm.com>
    Cc: Vasily Gorbik <gor@linux.ibm.com>
    Cc: Alexander Gordeev <agordeev@linux.ibm.com>
    Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
    Cc: Sven Schnelle <svens@linux.ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    12827233
lcs.c 60.2 KB