diff for duplicates of <4F3A7B29.10603@cam.ac.uk> diff --git a/a/1.txt b/N1/1.txt index 12ad181..f4a6339 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -2,9 +2,8 @@ On 2/14/2012 3:04 PM, Dan Carpenter wrote: > On Tue, Feb 14, 2012 at 03:35:36PM +0100, Danny Kukawka wrote: >> Fix for: >> drivers/staging/iio/gyro/adis16080_core.c: In function ->> =E2=80=98adis16080_read_raw=E2=80=99: ->> drivers/staging/iio/gyro/adis16080_core.c:99:8: warning: =E2=80=98ut= -=E2=80=99 +>> ‘adis16080_read_raw’: +>> drivers/staging/iio/gyro/adis16080_core.c:99:8: warning: ‘ut’ >> may be used uninitialized in this function [-Wuninitialized] >> >> Initialize ut and change error handling from adis16080_read_raw(). @@ -14,35 +13,32 @@ On 2/14/2012 3:04 PM, Dan Carpenter wrote: >> drivers/staging/iio/gyro/adis16080_core.c | 4 ++-- >> 1 files changed, 2 insertions(+), 2 deletions(-) >> ->> diff --git a/drivers/staging/iio/gyro/adis16080_core.c b/drivers/sta= -ging/iio/gyro/adis16080_core.c +>> diff --git a/drivers/staging/iio/gyro/adis16080_core.c b/drivers/staging/iio/gyro/adis16080_core.c >> index 1815490..e0b2a29 100644 >> --- a/drivers/staging/iio/gyro/adis16080_core.c >> +++ b/drivers/staging/iio/gyro/adis16080_core.c ->> @@ -82,7 +82,7 @@ static int adis16080_read_raw(struct iio_dev *indi= -o_dev, +>> @@ -82,7 +82,7 @@ static int adis16080_read_raw(struct iio_dev *indio_dev, >> long mask) >> { ->> int ret =3D -EINVAL; +>> int ret = -EINVAL; >> - u16 ut; ->> + u16 ut =3D 0; +>> + u16 ut = 0; >> /* Take the iio_dev status lock */ >> >> mutex_lock(&indio_dev->mlock); ->> @@ -94,7 +94,7 @@ static int adis16080_read_raw(struct iio_dev *indi= -o_dev, +>> @@ -94,7 +94,7 @@ static int adis16080_read_raw(struct iio_dev *indio_dev, >> if (ret< 0) >> break; ->> ret =3D adis16080_spi_read(indio_dev,&ut); +>> ret = adis16080_spi_read(indio_dev,&ut); >> - if (ret< 0) >> + if (ret) >> break; > Either one of these changes would silence the warning from gcc -> (which is a false positive). I would keep the "ut =3D 0;" change and +> (which is a false positive). I would keep the "ut = 0;" change and > leave the error handling the same. That way we check for less than > zero consistently instead of checking some for non-zero and some for > less than zero. -Agreed. I've always been lazy on this one as it was a false positive,=20 +Agreed. I've always been lazy on this one as it was a false positive, but might as well get rid of it... > @@ -54,6 +50,5 @@ get rid of it... > would be grand as well. Everyone seems to be using the prefix > "staging:iio:gyro:adis16080" for that file... I don't know why they > don't just use slashes if they're going to specify the whole file... -=46air point. Ah well, habits die hard. Sometimes we have things lik= -e +Fair point. Ah well, habits die hard. Sometimes we have things like staging:iio:treewide which is probably why I started doing this... diff --git a/a/content_digest b/N1/content_digest index daee9b0..b78d6eb 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -19,9 +19,8 @@ "> On Tue, Feb 14, 2012 at 03:35:36PM +0100, Danny Kukawka wrote:\n" ">> Fix for:\n" ">> drivers/staging/iio/gyro/adis16080_core.c: In function\n" - ">> =E2=80=98adis16080_read_raw=E2=80=99:\n" - ">> drivers/staging/iio/gyro/adis16080_core.c:99:8: warning: =E2=80=98ut=\n" - "=E2=80=99\n" + ">> \342\200\230adis16080_read_raw\342\200\231:\n" + ">> drivers/staging/iio/gyro/adis16080_core.c:99:8: warning: \342\200\230ut\342\200\231\n" ">> may be used uninitialized in this function [-Wuninitialized]\n" ">>\n" ">> Initialize ut and change error handling from adis16080_read_raw().\n" @@ -31,35 +30,32 @@ ">> drivers/staging/iio/gyro/adis16080_core.c | 4 ++--\n" ">> 1 files changed, 2 insertions(+), 2 deletions(-)\n" ">>\n" - ">> diff --git a/drivers/staging/iio/gyro/adis16080_core.c b/drivers/sta=\n" - "ging/iio/gyro/adis16080_core.c\n" + ">> diff --git a/drivers/staging/iio/gyro/adis16080_core.c b/drivers/staging/iio/gyro/adis16080_core.c\n" ">> index 1815490..e0b2a29 100644\n" ">> --- a/drivers/staging/iio/gyro/adis16080_core.c\n" ">> +++ b/drivers/staging/iio/gyro/adis16080_core.c\n" - ">> @@ -82,7 +82,7 @@ static int adis16080_read_raw(struct iio_dev *indi=\n" - "o_dev,\n" + ">> @@ -82,7 +82,7 @@ static int adis16080_read_raw(struct iio_dev *indio_dev,\n" ">> \t\t\t long mask)\n" ">> {\n" - ">> \tint ret =3D -EINVAL;\n" + ">> \tint ret = -EINVAL;\n" ">> -\tu16 ut;\n" - ">> +\tu16 ut =3D 0;\n" + ">> +\tu16 ut = 0;\n" ">> \t/* Take the iio_dev status lock */\n" ">>\n" ">> \tmutex_lock(&indio_dev->mlock);\n" - ">> @@ -94,7 +94,7 @@ static int adis16080_read_raw(struct iio_dev *indi=\n" - "o_dev,\n" + ">> @@ -94,7 +94,7 @@ static int adis16080_read_raw(struct iio_dev *indio_dev,\n" ">> \t\tif (ret< 0)\n" ">> \t\t\tbreak;\n" - ">> \t\tret =3D adis16080_spi_read(indio_dev,&ut);\n" + ">> \t\tret = adis16080_spi_read(indio_dev,&ut);\n" ">> -\t\tif (ret< 0)\n" ">> +\t\tif (ret)\n" ">> \t\t\tbreak;\n" "> Either one of these changes would silence the warning from gcc\n" - "> (which is a false positive). I would keep the \"ut =3D 0;\" change and\n" + "> (which is a false positive). I would keep the \"ut = 0;\" change and\n" "> leave the error handling the same. That way we check for less than\n" "> zero consistently instead of checking some for non-zero and some for\n" "> less than zero.\n" - "Agreed. I've always been lazy on this one as it was a false positive,=20\n" + "Agreed. I've always been lazy on this one as it was a false positive, \n" "but might as well\n" "get rid of it...\n" ">\n" @@ -71,8 +67,7 @@ "> would be grand as well. Everyone seems to be using the prefix\n" "> \"staging:iio:gyro:adis16080\" for that file... I don't know why they\n" "> don't just use slashes if they're going to specify the whole file...\n" - "=46air point. Ah well, habits die hard. Sometimes we have things lik=\n" - "e\n" + "Fair point. Ah well, habits die hard. Sometimes we have things like\n" staging:iio:treewide which is probably why I started doing this... -2ddd2587a751093009a69428b3bf95f71cde16fa4641748759054e3dabe7e364 +55ba350371df960efee8734b19dbf93f3512cd3c835821a5457bb2f90092a2ae
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.