Re: [PATCH 01/11] [Storage] Moved parts not depending on fsg_dev to separate files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 03 Sep 2009 22:44:47 +0200, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:

On Mon, 31 Aug 2009, [iso-8859-2] Micha³ Nazarewicz wrote:

Also, names of various functions, structures and variables
have been changed.  This is to prevent potential name
collision when the common file will be used with other code.

Personally, I dislike seeing Changelog messages that are continuations
of the Subject line.  They can easily get separated, making the context
difficult or impossible to figure out.

I've just copied and pasted what format-patch gave me.  Will take this
opinion in future submissions though.

@@ -170,10 +172,10 @@
   * REGISTERED atomic bitflag; the driver will only be deregistered once.
   * The second problem is resolved by having fsg_unbind() check
   * fsg->state; it won't try to stop the thread if the state is already
- * FSG_STATE_TERMINATED.
+ * STOR_STATE_TERMINATED.

Did you really have to change all these things throughout the entire
file?

Well.  I though that using FSG prefix in storage_common as well as
mass_storage will be awkward.  That's why I decided to use "stor"
for storage_common (ie. thinks common for both FSG and MSF that is
/storage/ gadget/function), "fsg" for file_storage and "msf" for
f_mass_storage.

It's hard to see the important parts of the patch, buried as
they are amidst all these inconsequential name changes.

I'll try to separate the patch and resend it then.

The style in Linux is to avoid having
preprocessor conditionals inside functions, as much as possible.

It seamed more readable this way but will fix it in future version.

-	DBG(fsg, "%s set halt\n", name);
+	SDBG(fsg, "%s set halt\n", name);

Here's another example of an apparently unnecessary name change.
Would DBG really clash with anything else?

Well yes. include/linux/usb/composite.h has it's own definition.
However, now I see I overlooked the fact that definitions in FSG and
in composite.h are the same.  I'll fix that in the future patch.

--
Best regards,                                            _     _
 .o. | Liege of Serenly Enlightened Majesty of         o' \,=./ `o
 ..o | Computer Science,  Michał "mina86" Nazarewicz      (o o)
 ooo +-<m.nazarewicz@xxxxxxxxxxx>-<mina86@xxxxxxxxxx>-ooO--(_)--Ooo--

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux