On Mon, Apr 11, 2022 at 8:09 AM Ozgur <ozgur@xxxxxxxxx> wrote: > > > > 11.04.2022, 02:53, "Damien Le Moal" <damien.lemoal@xxxxxxxxxxxxxxxxxx>: > > On 4/10/22 15:30, Zheyu Ma wrote: > > Hello, > > I found a bug in the pata_marvell module. > When probing the driver, it seems to trigger the error path and > executes the function marvell_cable_detect(), but the > 'ap->ioaddr.bmdma_addr' is not initialized, which causes a warning. > > > > Hello, > i'm not sure if this is a bug because you get as ap points to a port number. > > (ap->port_no) > > it points to 0x1 port that appears in error message. Please correct me if i'm wrong, actually 'ap->port_no' is zero, and the 'ap->ioaddr.bmdma_addr' is zero too since it is not initialized. > otherwise BUG will work and if it cannot read warning will return. > ( BUG(); is macro ) Zheyu Ma