Re: Is this a Bug?

2011-06-22 Thread Wilson Felipe
you can use the get_maintainer.pl script:

~/linux-2.6 $ ./scripts/get_maintainer.pl -f sound/soc/codecs/wm8958-dsp2.c

it will give you the maintainers names and emails

On Wed, Jun 22, 2011 at 12:49 AM, Greg Freemyer greg.freem...@gmail.com wrote:
 On Tue, Jun 21, 2011 at 5:57 PM, Christian Deussen
 chrisudeus...@googlemail.com wrote:

 Hi,
 I just compiled my first Kernel from linus' tree and saw a warning in
 sound/soc/codecs/wm8958-dsp2.c.
 I think a found a bug, but I am not sure. And I don`t want to waste the
 Kernel-dev's time on the lkml.
 In function wm8958_dsp2_fw(), at line 64, there is an uninitialized variable
 used.

 u32 data 32;
   ...
  /*not related code*/
 ...
 if (memcmp(fw-data, WMFW, 4) != 0) {
 dev_err(codec-dev, %s: firmware has bad file magic %08x\n,
 name, data32); //shouldn't fw-data be used?
 goto err;
 }
 Am I right? And does this detail matter anyway?
 I made several small fixes for warnings and added some #ifdef CONFIG_BLA
 when code wasnt used. Are those changes welcome on the LKML?
 Thanks for your time.

 First, every part of the kernel has a maintainer.  You can look in the
 maintainers file to see who it is and which mailinglist to use for the
 code in question.

 Your find it in the root of your kernel source directory.  Or online
 at http://lxr.linux.no/#linux+v2.6.39/MAINTAINERS

 So any patches need to go the right maintainer and the right mailing
 list.  I for one avoid LKML itself due to the massive traffic.  But I
 follow libata and ext4 and a couple others.  That makes the process
 reasonable.

 Note your email should be to the right list and to the right
 maintainer.  Both should be on the TO: line of your email.

 As to your question, I think it varies by the maintainer.

 If the maintainer is carrying a lot of out of tree patches for the
 part of the kernel he maintains, then every time he accepts a patch,
 it has the potential to cause those patches to no longer apply.

 As an example, the ext4 filesystem currently has dozens or even
 hundreds of patches that have been submitted fro review, or which are
 in the process of being developed, but which are not yet in the main
 kernel.

 A proposed patch to fix a compile warning or the code indention, etc.
 is likely not welcome on its own.

 On the other hand, if you are making a real code change which is an
 improvement, then submitting a patch series with the first patch or
 two addressing code style issues, etc. at the start of the series
 would be welcome.

 The reason being any other patches that are going to effect that same
 part of the code are going to need to re-based anyway due to the
 functional change, so putting in a cosmetic change at the same causes
 little extra work in the re-basing process.

 Hope that makes sense, even if it doesn't answer your question.

 At the end of the day, you might just want to send the maintainer (and
 the right list) a email asking if a patch like that is welcome, etc.

 Greg

 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


how to implement a SCSI commands through a driver?

2011-06-22 Thread RKK
Hi all ,
Im trying to implement a custom new storage protocl which uses SCSI
for storage in Linux .  I have been looking around for some files in
the Linux SCSI subsystems to understand its three  layered design. The
idea is to develop a separate stack which will internally use SCSI .
so to get started all i want to do is write a module(kernel space)
which sends SCSI commands to target device and retrieve some
information from it. any idea like to how to proceed and which are
files/books that can help me in this regard. I'm reading SCSI SPC-4
and SBC-3 specifications .

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: threading problem

2011-06-22 Thread Daniel Baluta
Hello Murali,

 I have a device driver which provides the IOCTL function for the
 application to interact.

 when the application sends the IOCTL CMD_GO, my driver has to toggle a
 GPIO every 500 m Sec. until a 3 minute timeout occurs or a CMD_STOP
 IOCTL is received.

 I tried the DECLARE_WORK, DECLARE_DELAYED_WORK and also
 kernel_thread() to meet this requirement with no success.


Could you please show us the code?

thanks,
Daniel.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to implement a SCSI commands through a driver?

2011-06-22 Thread sumeet gandhare
On Wed, Jun 22, 2011 at 5:22 PM, RKK kulkarni.ra...@gmail.com wrote:

 Hi all ,
 Im trying to implement a custom new storage protocl which uses SCSI
 for storage in Linux .  I have been looking around for some files in
 the Linux SCSI subsystems to understand its three  layered design. The
 idea is to develop a separate stack which will internally use SCSI .
 so to get started all i want to do is write a module(kernel space)
 which sends SCSI commands to target device and retrieve some
 information from it. any idea like to how to proceed and which are
 files/books that can help me in this regard. I'm reading SCSI SPC-4
 and SBC-3 specifications .

 Hi Ravi,
   Please have a look at files drivers/scsi/scsi_lib.c , drivers/scsi/scsi.c
and drivers/scsi/scsi_scan.c, drivers/scsi/scsi_error.c
   scsi_scan.c contains the scsi discovery code. scsi_error.c contains the
error recovery code ..

   The main entry point function in scsi middle layer is scsi_request_fn ()
http://lxr.linux.no/#linux+v2.6.39/drivers/scsi/scsi_lib.c#L1481
  Also look at function scsi_alloc_sdev () in
http://lxr.linux.no/#linux+v2.6.39/drivers/scsi/scsi_scan.c#L238 ..

Regards,
Sumeet

 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Is this a Bug?

2011-06-22 Thread julie Sullivan
Hi Christian,

Here's the most recent conversation I found (last month) on LKML
regarding this file where someone sent a patch, you may find it
helpful to read through the thread to see what the maintainers said.

https://lkml.org/lkml/2011/5/6/353

HTH,
Julie

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Is this a Bug?

2011-06-22 Thread julie Sullivan
Hmm, I just enabled the 'Build all ASoC CODEC drivers' option (I don't
have the hardware) to build-test to see if I could get the same
warning as Christian and I didn't, but I did get this in the same
tree:

sound/soc/codecs/ak4641.c: In function ‘ak4641_probe’:
sound/soc/codecs/ak4641.c:524:6: error: ‘GPIOF_OUT_INIT_LOW’
undeclared (first use in this function)
sound/soc/codecs/ak4641.c:524:6: note: each undeclared identifier is
reported only once for each function it appears in
make[3]: *** [sound/soc/codecs/ak4641.o] Error 1
make[2]: *** [sound/soc/codecs] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2
make: *** Waiting for unfinished jobs

Odd.

Is there some other CONFIG_ I'm not setting that I need to for your
driver, Christian? (I'm using -rc3, -rc4 won't boot but that's another
problem...)

---

btw if you _are_ sending a patch and it's your first one:

remember you can avoid the embarrassment of maintainers experiencing
your tabs to space conversion, word-wrapping and other
reformatting/corruption horrors by sending yourself the patch first to
check it applies - or send it to us, I'm happy to 'apply check' it for
you if you can let me know what kernel version to check out  (can't
promise I'll do it the same day though) :-)

If you are thinking of using the Gmail web gui to send a patch be sure
to read Documentation/email-clients.txt with special reference to the
bit at the bottom of that file...

Cheers
Julie

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


spin locks

2011-06-22 Thread Venkateswarlu P
can anyone help in the implementation  of  spin locks  in kernel  source



i go through  the  relevant   header files and found  various  debugging
CONFIG  options in the  struct



i want   the  code  without   debugging  features  and  the  function
spin_lock()   spin_unlock()  implementation



I  understood  major part  but unable to find  the correct source
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: spin locks

2011-06-22 Thread Darshan Ghumare
On Thu, Jun 23, 2011 at 10:01 AM, Venkateswarlu P
p.venkatesh...@gmail.comwrote:


 can anyone help in the implementation  of  spin locks  in kernel
 source



 i go through  the  relevant   header files and found  various  debugging
 CONFIG  options in the  struct



 i want   the  code  without   debugging  features  and  the  function
 spin_lock()   spin_unlock()  implementation



 I  understood  major part  but unable to find  the correct source

http://lxr.linux.no/linux+v2.6.39/include/linux/spinlock.h
http://lxr.linux.no/linux/kernel/spinlock.c



 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




-- 
Darshan®
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies