> -----Original Message----- > From: "Kai Mäkisara (Kolumbus)" [mailto:kai.makisara@xxxxxxxxxxx] > Sent: Monday, December 16, 2013 7:49 PM > To: Strösser, Bodo > Cc: linux-scsi@xxxxxxxxxxxxxxx > Subject: Re: [PATCH 3/3] st.ko: change enlarge_buffer result > > > On 2.12.2013, at 21.00, Bodo Stroesser <bstroesser@xxxxxxxxxxxxxx> wrote: > > > From: Bodo Stroesser <bstroesser@xxxxxxxxxxxxxx> > > Date: Mon, 2 Dec 2013 18:52:10 +0100 > > Subject: [PATCH 3/3] st.ko: change enlarge_buffer result > > > > enlarge_buffer() just returns 1 or 0 if it could or could > > not allocate the requested buffer. > > > > In case of result 0, the callers always set the error to > > EOVERFLOW. I think, this is not a good errno for those > > cases, where enlarge_buffer() could not allocate the pages > > it needed. > > > > So I changed enlarge_buffer() to return a meaningful > > result (-ENOMEM or -EOVERFLOW in case of error, 0 in case of > > success) and the callers to use this result. > > > ENOMEM is used for telling the user that, in variable block mode, the byte count in read() > is smaller than the next block. This may not sound like proper use of this code but this > is how the tape drivers have done. Oops, sorry, I missed that. So I agree fully, that the patch does not make sense. Thank you, Bodo > When ENOMEM is not used, the patch would be only cosmetic. > > Thanks, > Kai -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html