[PATCH] csiostor:Fix error handling in the function csio_hws_ready

2015-08-04 Thread Nicholas Krause
From: Nicholas Krause 

This fixes error handling in the function csio_hws_ready for when
this function calls csio_scim_cleanup_io to cleanup outstanding
commands by checking if it cleaned a error code to signal internal
failure and if so tell the user we are unable to clean up the
outstanding io commands by printing this to the console before

Signed-off-by: Nicholas Krause 
---
 drivers/scsi/csiostor/csio_hw.c | 16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
index 622bdab..49c47d3 100644
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers/scsi/csiostor/csio_hw.c
@@ -2445,11 +2445,17 @@ csio_hws_ready(struct csio_hw *hw, enum csio_hw_ev evt)
csio_set_state(>sm, csio_hws_quiescing);
/* cleanup all outstanding cmds */
if (evt == CSIO_HWE_HBA_RESET ||
-   evt == CSIO_HWE_PCIERR_DETECTED)
-   csio_scsim_cleanup_io(csio_hw_to_scsim(hw), false);
-   else
-   csio_scsim_cleanup_io(csio_hw_to_scsim(hw), true);
-
+   evt == CSIO_HWE_PCIERR_DETECTED) {
+   if (csio_scsim_cleanup_io(csio_hw_to_scsim(hw), false)) 
{
+   csio_err(hw, "Unable to properly cleanup 
outstanding commands on this device\n");
+   return;
+   }
+   } else {
+   if (csio_scsim_cleanup_io(csio_hw_to_scsim(hw), true)) {
+   csio_err(hw, "Unable to properly cleanup 
outstanding commands on this device\n");
+   return;
+   }
+   }
csio_hw_intr_disable(hw);
csio_hw_mbm_cleanup(hw);
csio_evtq_stop(hw);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] ipv6:Fix concurrent access issue in the function inet6_rtm_deladdr

2015-08-04 Thread Nicholas Krause
From: Nicholas Krause 

This fixes the issue with conncurrent access when calling the function
inte6_addr_del due to this function using non locked wrapper versions
of certain functions by locking the routing mutex before and after this
call with rtnl_lock/unlock. After the unlocking just return the error
code as normal to signal success or failure to the caller of the function
inet_6_rtm_addr.

Signed-off-by: Nicholas Krause 
---
 net/ipv6/addrconf.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 21c2c81..b6103e0 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4006,8 +4006,11 @@ inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr 
*nlh)
/* We ignore other flags so far. */
ifa_flags &= IFA_F_MANAGETEMPADDR;
 
-   return inet6_addr_del(net, ifm->ifa_index, ifa_flags, pfx,
+   rtnl_lock();
+   err =  inet6_addr_del(net, ifm->ifa_index, ifa_flags, pfx,
  ifm->ifa_prefixlen);
+   rtnl_unlock();
+   return err;
 }
 
 static int inet6_addr_modify(struct inet6_ifaddr *ifp, u32 ifa_flags,
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] csiostor:Fix error handling in the function csio_hws_ready

2015-08-04 Thread Nicholas Krause
From: Nicholas Krause xerofo...@gmail.com

This fixes error handling in the function csio_hws_ready for when
this function calls csio_scim_cleanup_io to cleanup outstanding
commands by checking if it cleaned a error code to signal internal
failure and if so tell the user we are unable to clean up the
outstanding io commands by printing this to the console before

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/scsi/csiostor/csio_hw.c | 16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
index 622bdab..49c47d3 100644
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers/scsi/csiostor/csio_hw.c
@@ -2445,11 +2445,17 @@ csio_hws_ready(struct csio_hw *hw, enum csio_hw_ev evt)
csio_set_state(hw-sm, csio_hws_quiescing);
/* cleanup all outstanding cmds */
if (evt == CSIO_HWE_HBA_RESET ||
-   evt == CSIO_HWE_PCIERR_DETECTED)
-   csio_scsim_cleanup_io(csio_hw_to_scsim(hw), false);
-   else
-   csio_scsim_cleanup_io(csio_hw_to_scsim(hw), true);
-
+   evt == CSIO_HWE_PCIERR_DETECTED) {
+   if (csio_scsim_cleanup_io(csio_hw_to_scsim(hw), false)) 
{
+   csio_err(hw, Unable to properly cleanup 
outstanding commands on this device\n);
+   return;
+   }
+   } else {
+   if (csio_scsim_cleanup_io(csio_hw_to_scsim(hw), true)) {
+   csio_err(hw, Unable to properly cleanup 
outstanding commands on this device\n);
+   return;
+   }
+   }
csio_hw_intr_disable(hw);
csio_hw_mbm_cleanup(hw);
csio_evtq_stop(hw);
-- 
2.1.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] ipv6:Fix concurrent access issue in the function inet6_rtm_deladdr

2015-08-04 Thread Nicholas Krause
From: Nicholas Krause xerofo...@gmail.com

This fixes the issue with conncurrent access when calling the function
inte6_addr_del due to this function using non locked wrapper versions
of certain functions by locking the routing mutex before and after this
call with rtnl_lock/unlock. After the unlocking just return the error
code as normal to signal success or failure to the caller of the function
inet_6_rtm_addr.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 net/ipv6/addrconf.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 21c2c81..b6103e0 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4006,8 +4006,11 @@ inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr 
*nlh)
/* We ignore other flags so far. */
ifa_flags = IFA_F_MANAGETEMPADDR;
 
-   return inet6_addr_del(net, ifm-ifa_index, ifa_flags, pfx,
+   rtnl_lock();
+   err =  inet6_addr_del(net, ifm-ifa_index, ifa_flags, pfx,
  ifm-ifa_prefixlen);
+   rtnl_unlock();
+   return err;
 }
 
 static int inet6_addr_modify(struct inet6_ifaddr *ifp, u32 ifa_flags,
-- 
2.1.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] arm: Remove read of issue in sa1111.c in sa1111_resume

2014-09-27 Thread Nicholas Krause
This removes the FIXME message and issue with reading in this driver before 
resuming
in the function, sa_resume.

Signed-off-by: Nicholas Krause 
---
 arch/arm/common/sa.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/common/sa.c b/arch/arm/common/sa.c
index e57d7e5..0c4b9a9 100644
--- a/arch/arm/common/sa.c
+++ b/arch/arm/common/sa.c
@@ -950,9 +950,7 @@ static int sa_resume(struct platform_device *dev)
 
/*
 * Ensure that the SA is still here.
-* FIXME: shouldn't do this here.
 */
-   id = sa_readl(sachip->base + SA_SKID);
if ((id & SKID_ID_MASK) != SKID_SA_ID) {
__sa_remove(sachip);
platform_set_drvdata(dev, NULL);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] wireless: Remove unnessary write over of register 11 in rt2800lib.c

2014-09-27 Thread Nicholas Krause
This removes the unnecessary  overwrite of register 11 in the function,
rt2800_config_channel as we are already writing a correct value to the
register with rt2800_rfcsr_write(rt2x00dev,11.rfcsr).

Signed-off-by: Nicholas Krause 
---
 drivers/net/wireless/rt2x00/rt2800lib.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c 
b/drivers/net/wireless/rt2x00/rt2800lib.c
index 893c9d5..fb0ae38 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -2787,8 +2787,6 @@ static void rt2800_config_channel_rf55xx(struct 
rt2x00_dev *rt2x00dev,
 
if (rf->channel <= 14) {
rt2800_rfcsr_write(rt2x00dev, 10, 0x90);
-   /* FIXME: RF11 owerwrite ? */
-   rt2800_rfcsr_write(rt2x00dev, 11, 0x4A);
rt2800_rfcsr_write(rt2x00dev, 12, 0x52);
rt2800_rfcsr_write(rt2x00dev, 13, 0x42);
rt2800_rfcsr_write(rt2x00dev, 22, 0x40);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] wireless: Remove unnessary write over of register 11 in rt2800lib.c

2014-09-27 Thread Nicholas Krause
This removes the unnecessary  overwrite of register 11 in the function,
rt2800_config_channel as we are already writing a correct value to the
register with rt2800_rfcsr_write(rt2x00dev,11.rfcsr).

Signed-off-by: Nicholas Krause yoc...@gmail.com
---
 drivers/net/wireless/rt2x00/rt2800lib.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c 
b/drivers/net/wireless/rt2x00/rt2800lib.c
index 893c9d5..fb0ae38 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -2787,8 +2787,6 @@ static void rt2800_config_channel_rf55xx(struct 
rt2x00_dev *rt2x00dev,
 
if (rf-channel = 14) {
rt2800_rfcsr_write(rt2x00dev, 10, 0x90);
-   /* FIXME: RF11 owerwrite ? */
-   rt2800_rfcsr_write(rt2x00dev, 11, 0x4A);
rt2800_rfcsr_write(rt2x00dev, 12, 0x52);
rt2800_rfcsr_write(rt2x00dev, 13, 0x42);
rt2800_rfcsr_write(rt2x00dev, 22, 0x40);
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] arm: Remove read of issue in sa1111.c in sa1111_resume

2014-09-27 Thread Nicholas Krause
This removes the FIXME message and issue with reading in this driver before 
resuming
in the function, sa_resume.

Signed-off-by: Nicholas Krause yoc...@gmail.com
---
 arch/arm/common/sa.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/common/sa.c b/arch/arm/common/sa.c
index e57d7e5..0c4b9a9 100644
--- a/arch/arm/common/sa.c
+++ b/arch/arm/common/sa.c
@@ -950,9 +950,7 @@ static int sa_resume(struct platform_device *dev)
 
/*
 * Ensure that the SA is still here.
-* FIXME: shouldn't do this here.
 */
-   id = sa_readl(sachip-base + SA_SKID);
if ((id  SKID_ID_MASK) != SKID_SA_ID) {
__sa_remove(sachip);
platform_set_drvdata(dev, NULL);
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: FIXMEs in rt2800lib.c

2014-09-26 Thread Nicholas Krause
On Fri, Sep 26, 2014 at 8:22 AM, Stanislaw Gruszka  wrote:
> On Thu, Sep 25, 2014 at 01:52:43PM -0400, nick wrote:
>> I seem to be hitting to fix mes in the file I listed in the subject. Would 
>> someone tell me if it's Ok to remove
>> the lines that over write certain registers.
>
> No, as long you prove that they are not needed.
>
> Stanislaw
Sure Stanislw,
I will remove the lines as needed and send it a patch.
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: FIXMEs in rt2800lib.c

2014-09-26 Thread Nicholas Krause
On Fri, Sep 26, 2014 at 8:22 AM, Stanislaw Gruszka sgrus...@redhat.com wrote:
 On Thu, Sep 25, 2014 at 01:52:43PM -0400, nick wrote:
 I seem to be hitting to fix mes in the file I listed in the subject. Would 
 someone tell me if it's Ok to remove
 the lines that over write certain registers.

 No, as long you prove that they are not needed.

 Stanislaw
Sure Stanislw,
I will remove the lines as needed and send it a patch.
Nick
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] parisc:Remove unnecessary FIXMES in init.c

2014-09-24 Thread Nicholas Krause
On Wed, Sep 24, 2014 at 8:42 AM, John David Anglin  wrote:
> On 24-Sep-14, at 7:42 AM, nick wrote:
>
>>
>>
>> On 14-09-24 01:30 AM, Guenter Roeck wrote:
>>>
>>> On Tue, Sep 23, 2014 at 09:49:43PM -0400, Nicholas Krause wrote:
>>>>
>>>> This removes the two fixmes in the file, init.c for compiler hints
>>>> for comments related to compiler hints in linux_gateway_page_addr
>>>> and map_hpux_gateway_page to change from FIXME to HINT in order
>>>> for people reading this code to understand that these are compiler
>>>> hints.
>>>>
>>>
>>> "* const" tells the compiler that a pointer is a constant.
>>> It doesn't tell the compiler that the data shall not be treated
>>> as DP-relative.
>>>
>>> FIXME as in: We should find a better way to tell the compiler to
>>> not treat this data as DP-relative.
>>>
>>> Can you please stop this ?
>>>
>>> Guenter
>>>
>>>> Signed-off-by: Nicholas Krause 
>>>> ---
>>>> arch/parisc/mm/init.c | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
>>>> index 0bef864..668102e 100644
>>>> --- a/arch/parisc/mm/init.c
>>>> +++ b/arch/parisc/mm/init.c
>>>> @@ -733,7 +733,7 @@ static void __init pagetable_init(void)
>>>> static void __init gateway_init(void)
>>>> {
>>>> unsigned long linux_gateway_page_addr;
>>>> -   /* FIXME: This is 'const' in order to trick the compiler
>>>> +   /* HINT: This is 'const' in order to trick the compiler
>>>>into not treating it as DP-relative data. */
>>>> extern void * const linux_gateway_page;
>>>>
>>>> @@ -761,7 +761,7 @@ map_hpux_gateway_page(struct task_struct *tsk,
>>>> struct mm_struct *mm)
>>>> unsigned long start_pte;
>>>> unsigned long address;
>>>> unsigned long hpux_gw_page_addr;
>>>> -   /* FIXME: This is 'const' in order to trick the compiler
>>>> +   /* HINT: This is 'const' in order to trick the compiler
>>>>into not treating it as DP-relative data. */
>>>> extern void * const hpux_gateway_page;
>>>>
>>>> --
>>>> 1.9.1
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel"
>>>> in
>>>> the body of a message to majord...@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>> Please read the FAQ at  http://www.tux.org/lkml/
>>>>
>>>>
>> Guenter,
>> I asked the maintainers and I got,
>> On 9/23/2014 4:48 PM, Helge Deller wrote:
>>>
>>> The FIXME: is misleading. It should maybe better read "HINT:" or
>>> something like that.
>>> Trivially it's basically just casting the symbol so that the compiler
>>> will produce the correct code later on.
>>> There is nothing you could try to "fix".
>>
>> Why not just remove "FIXME: " from these comments?
>
>
>
> The wording of the comment is not good.  You can't "trick" the compiler into
> not
> treating a constant as DP-relative data.  Whether or not a constant is
> loaded as an
> immediate depends on its value.
>
> Dave
> --
> John David Anglin   dave.ang...@bell.net
>
>
>
Are stating I need to change the wording of  my commit or the comment?
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] parisc:Remove unnecessary FIXMES in init.c

2014-09-24 Thread Nicholas Krause
On Wed, Sep 24, 2014 at 8:42 AM, John David Anglin dave.ang...@bell.net wrote:
 On 24-Sep-14, at 7:42 AM, nick wrote:



 On 14-09-24 01:30 AM, Guenter Roeck wrote:

 On Tue, Sep 23, 2014 at 09:49:43PM -0400, Nicholas Krause wrote:

 This removes the two fixmes in the file, init.c for compiler hints
 for comments related to compiler hints in linux_gateway_page_addr
 and map_hpux_gateway_page to change from FIXME to HINT in order
 for people reading this code to understand that these are compiler
 hints.


 * const tells the compiler that a pointer is a constant.
 It doesn't tell the compiler that the data shall not be treated
 as DP-relative.

 FIXME as in: We should find a better way to tell the compiler to
 not treat this data as DP-relative.

 Can you please stop this ?

 Guenter

 Signed-off-by: Nicholas Krause yoc...@gmail.com
 ---
 arch/parisc/mm/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

 diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
 index 0bef864..668102e 100644
 --- a/arch/parisc/mm/init.c
 +++ b/arch/parisc/mm/init.c
 @@ -733,7 +733,7 @@ static void __init pagetable_init(void)
 static void __init gateway_init(void)
 {
 unsigned long linux_gateway_page_addr;
 -   /* FIXME: This is 'const' in order to trick the compiler
 +   /* HINT: This is 'const' in order to trick the compiler
into not treating it as DP-relative data. */
 extern void * const linux_gateway_page;

 @@ -761,7 +761,7 @@ map_hpux_gateway_page(struct task_struct *tsk,
 struct mm_struct *mm)
 unsigned long start_pte;
 unsigned long address;
 unsigned long hpux_gw_page_addr;
 -   /* FIXME: This is 'const' in order to trick the compiler
 +   /* HINT: This is 'const' in order to trick the compiler
into not treating it as DP-relative data. */
 extern void * const hpux_gateway_page;

 --
 1.9.1

 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel
 in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/


 Guenter,
 I asked the maintainers and I got,
 On 9/23/2014 4:48 PM, Helge Deller wrote:

 The FIXME: is misleading. It should maybe better read HINT: or
 something like that.
 Trivially it's basically just casting the symbol so that the compiler
 will produce the correct code later on.
 There is nothing you could try to fix.

 Why not just remove FIXME:  from these comments?



 The wording of the comment is not good.  You can't trick the compiler into
 not
 treating a constant as DP-relative data.  Whether or not a constant is
 loaded as an
 immediate depends on its value.

 Dave
 --
 John David Anglin   dave.ang...@bell.net



Are stating I need to change the wording of  my commit or the comment?
Nick
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] parisc:Remove unnecessary FIXMES in init.c

2014-09-23 Thread Nicholas Krause
This removes the two fixmes in the file, init.c for compiler hints
for comments related to compiler hints in linux_gateway_page_addr
and map_hpux_gateway_page to change from FIXME to HINT in order
for people reading this code to understand that these are compiler
hints.

Signed-off-by: Nicholas Krause 
---
 arch/parisc/mm/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 0bef864..668102e 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -733,7 +733,7 @@ static void __init pagetable_init(void)
 static void __init gateway_init(void)
 {
unsigned long linux_gateway_page_addr;
-   /* FIXME: This is 'const' in order to trick the compiler
+   /* HINT: This is 'const' in order to trick the compiler
   into not treating it as DP-relative data. */
extern void * const linux_gateway_page;
 
@@ -761,7 +761,7 @@ map_hpux_gateway_page(struct task_struct *tsk, struct 
mm_struct *mm)
unsigned long start_pte;
unsigned long address;
unsigned long hpux_gw_page_addr;
-   /* FIXME: This is 'const' in order to trick the compiler
+   /* HINT: This is 'const' in order to trick the compiler
   into not treating it as DP-relative data. */
extern void * const hpux_gateway_page;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: FIX Me in pgtable.h

2014-09-23 Thread Nicholas Krause
I don't have any hardware to test this over, however I can emulate a
arm system over qemu if needed.
I was just trying to help out if we need hardware I can't test and
again I am sorry for the terrible patches.
It was never my goal to be a nuisance.
Nick
On Tue, Sep 23, 2014 at 9:46 AM, Krzysztof Kozłowski
 wrote:
> On 23.09.2014 15:04, nick wrote:
>>
>> Greetings Arm Maintainers,
>> I am wondering about the fix me in pgtable.h for define kern_addr_valid
>> and how to set it to a correct
>> value as you state that this needs to be fixed as the defined macro is
>> still 1. This is probably incorrect
>> and should be changed.
>
>
> Dear Nick Krause,
>
> Before you start coding - do you have necessary ARM-based hardware to test
> your changes?
>
> Changing email won't remove LKML archives...
>
> Best regards,
> Krzysztof
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: FIX Me in pgtable.h

2014-09-23 Thread Nicholas Krause
I don't have any hardware to test this over, however I can emulate a
arm system over qemu if needed.
I was just trying to help out if we need hardware I can't test and
again I am sorry for the terrible patches.
It was never my goal to be a nuisance.
Nick
On Tue, Sep 23, 2014 at 9:46 AM, Krzysztof Kozłowski
k.kozlow...@samsung.com wrote:
 On 23.09.2014 15:04, nick wrote:

 Greetings Arm Maintainers,
 I am wondering about the fix me in pgtable.h for define kern_addr_valid
 and how to set it to a correct
 value as you state that this needs to be fixed as the defined macro is
 still 1. This is probably incorrect
 and should be changed.


 Dear Nick Krause,

 Before you start coding - do you have necessary ARM-based hardware to test
 your changes?

 Changing email won't remove LKML archives...

 Best regards,
 Krzysztof

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] parisc:Remove unnecessary FIXMES in init.c

2014-09-23 Thread Nicholas Krause
This removes the two fixmes in the file, init.c for compiler hints
for comments related to compiler hints in linux_gateway_page_addr
and map_hpux_gateway_page to change from FIXME to HINT in order
for people reading this code to understand that these are compiler
hints.

Signed-off-by: Nicholas Krause yoc...@gmail.com
---
 arch/parisc/mm/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 0bef864..668102e 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -733,7 +733,7 @@ static void __init pagetable_init(void)
 static void __init gateway_init(void)
 {
unsigned long linux_gateway_page_addr;
-   /* FIXME: This is 'const' in order to trick the compiler
+   /* HINT: This is 'const' in order to trick the compiler
   into not treating it as DP-relative data. */
extern void * const linux_gateway_page;
 
@@ -761,7 +761,7 @@ map_hpux_gateway_page(struct task_struct *tsk, struct 
mm_struct *mm)
unsigned long start_pte;
unsigned long address;
unsigned long hpux_gw_page_addr;
-   /* FIXME: This is 'const' in order to trick the compiler
+   /* HINT: This is 'const' in order to trick the compiler
   into not treating it as DP-relative data. */
extern void * const hpux_gateway_page;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] v4l2: Change call of function in videobuf2-core.c

2014-08-03 Thread Nicholas Krause
This patch changes the call of vb2_buffer_core to use VB2_BUFFER_STATE_ACTIVE
inside the for instead of not setting in correctly to VB2_BUFFER_STATE_ERROR.

Signed-off-by: Nicholas Krause 
---
 drivers/media/v4l2-core/videobuf2-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/videobuf2-core.c 
b/drivers/media/v4l2-core/videobuf2-core.c
index 7c4489c..08e478b 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -2115,7 +2115,7 @@ static void __vb2_queue_cancel(struct vb2_queue *q)
if (WARN_ON(atomic_read(>owned_by_drv_count))) {
for (i = 0; i < q->num_buffers; ++i)
if (q->bufs[i]->state == VB2_BUF_STATE_ACTIVE)
-   vb2_buffer_done(q->bufs[i], 
VB2_BUF_STATE_ERROR);
+   vb2_buffer_done(q->bufs[i], 
VB2_BUF_STATE_ACTIVE);
/* Must be zero now */
WARN_ON(atomic_read(>owned_by_drv_count));
}
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] v4l2: Change call of function in videobuf2-core.c

2014-08-03 Thread Nicholas Krause
This patch changes the call of vb2_buffer_core to use VB2_BUFFER_STATE_ACTIVE
inside the for instead of not setting in correctly to VB2_BUFFER_STATE_ERROR.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/media/v4l2-core/videobuf2-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/videobuf2-core.c 
b/drivers/media/v4l2-core/videobuf2-core.c
index 7c4489c..08e478b 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -2115,7 +2115,7 @@ static void __vb2_queue_cancel(struct vb2_queue *q)
if (WARN_ON(atomic_read(q-owned_by_drv_count))) {
for (i = 0; i  q-num_buffers; ++i)
if (q-bufs[i]-state == VB2_BUF_STATE_ACTIVE)
-   vb2_buffer_done(q-bufs[i], 
VB2_BUF_STATE_ERROR);
+   vb2_buffer_done(q-bufs[i], 
VB2_BUF_STATE_ACTIVE);
/* Must be zero now */
WARN_ON(atomic_read(q-owned_by_drv_count));
}
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] scatterlist.h: Change CONFIG_DEBUG_SG for ifdef statement in sg_set_bf

2014-08-02 Thread Nicholas Krause
This changes the ifdef statement in sg_set_bg to !CONFIG_DEBUG_SG in order
to avoid a bug with xhci dequence/enquence functions.

Signed-off-by: Nicholas Krause 
---
 include/linux/scatterlist.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index adae88f..62de7b3 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -111,7 +111,7 @@ static inline struct page *sg_page(struct scatterlist *sg)
 static inline void sg_set_buf(struct scatterlist *sg, const void *buf,
  unsigned int buflen)
 {
-#ifdef CONFIG_DEBUG_SG
+#ifdef !CONFIG_DEBUG_SG
BUG_ON(!virt_addr_valid(buf));
 #endif
sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf));
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] scatterlist.h: Change CONFIG_DEBUG_SG for ifdef statement in sg_set_bf

2014-08-02 Thread Nicholas Krause
This changes the ifdef statement in sg_set_bg to !CONFIG_DEBUG_SG in order
to avoid a bug with xhci dequence/enquence functions.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 include/linux/scatterlist.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index adae88f..62de7b3 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -111,7 +111,7 @@ static inline struct page *sg_page(struct scatterlist *sg)
 static inline void sg_set_buf(struct scatterlist *sg, const void *buf,
  unsigned int buflen)
 {
-#ifdef CONFIG_DEBUG_SG
+#ifdef !CONFIG_DEBUG_SG
BUG_ON(!virt_addr_valid(buf));
 #endif
sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf));
--
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Add support to check for FALLOC_FL_COLLAPSE_RANGE and FALLOC_FL_ZERO_RANGE crap modes

2014-07-31 Thread Nicholas Krause
This adds checks for the stated modes as if they are crap we will return error
not supported.

Signed-off-by: Nicholas Krause 
---
 fs/btrfs/file.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 1f2b99c..599495a 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2490,7 +2490,8 @@ static long btrfs_fallocate(struct file *file, int mode,
alloc_end = round_up(offset + len, blocksize);
 
/* Make sure we aren't being give some crap mode */
-   if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
+   if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE|
+   FALLOC_FL_COLLAPSE_RANGE | FALLOC_FL_ZERO_RANGE))
return -EOPNOTSUPP;
 
if (mode & FALLOC_FL_PUNCH_HOLE)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Add support to check for FALLOC_FL_COLLAPSE_RANGE and FALLOC_FL_ZERO_RANGE crap modes

2014-07-31 Thread Nicholas Krause
This adds checks for the stated modes as if they are crap we will return error
not supported.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 fs/btrfs/file.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 1f2b99c..599495a 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2490,7 +2490,8 @@ static long btrfs_fallocate(struct file *file, int mode,
alloc_end = round_up(offset + len, blocksize);
 
/* Make sure we aren't being give some crap mode */
-   if (mode  ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
+   if (mode  ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE|
+   FALLOC_FL_COLLAPSE_RANGE | FALLOC_FL_ZERO_RANGE))
return -EOPNOTSUPP;
 
if (mode  FALLOC_FL_PUNCH_HOLE)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Remove certain calls for releasing page cache

2014-07-30 Thread Nicholas Krause
This patch removes the lines for releasing the page cache in certain
files as this may aid in perfomance with writes in the compression
rountines of btrfs. Please note that this patch has not been tested
on my own hardware due to no compression based btrfs volumes of my
own.

Signed-off-by: Nicholas Krause 
---
 fs/btrfs/compression.c | 17 +
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 1daea0b..b55b0e1 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -1,4 +1,5 @@
 /*
+   
  * Copyright (C) 2008 Oracle.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
@@ -246,7 +247,6 @@ static noinline void end_compressed_writeback(struct inode 
*inode, u64 start,
}
for (i = 0; i < ret; i++) {
end_page_writeback(pages[i]);
-   page_cache_release(pages[i]);
}
nr_pages -= ret;
index += ret;
@@ -293,21 +293,6 @@ static void end_compressed_bio_write(struct bio *bio, int 
err)
 
end_compressed_writeback(inode, cb->start, cb->len);
/* note, our inode could be gone now */
-
-   /*
-* release the compressed pages, these came from alloc_page and
-* are not attached to the inode at all
-*/
-   index = 0;
-   for (index = 0; index < cb->nr_pages; index++) {
-   page = cb->compressed_pages[index];
-   page->mapping = NULL;
-   page_cache_release(page);
-   }
-
-   /* finally free the cb struct */
-   kfree(cb->compressed_pages);
-   kfree(cb);
 out:
bio_put(bio);
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Remove certain calls for releasing page cache

2014-07-30 Thread Nicholas Krause
This patch removes the lines for releasing the page cache in certain
files as this may aid in perfomance with writes in the compression
rountines of btrfs. Please note that this patch has not been tested
on my own hardware due to no compression based btrfs volumes of my
own.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 fs/btrfs/compression.c | 17 +
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 1daea0b..b55b0e1 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -1,4 +1,5 @@
 /*
+   
  * Copyright (C) 2008 Oracle.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
@@ -246,7 +247,6 @@ static noinline void end_compressed_writeback(struct inode 
*inode, u64 start,
}
for (i = 0; i  ret; i++) {
end_page_writeback(pages[i]);
-   page_cache_release(pages[i]);
}
nr_pages -= ret;
index += ret;
@@ -293,21 +293,6 @@ static void end_compressed_bio_write(struct bio *bio, int 
err)
 
end_compressed_writeback(inode, cb-start, cb-len);
/* note, our inode could be gone now */
-
-   /*
-* release the compressed pages, these came from alloc_page and
-* are not attached to the inode at all
-*/
-   index = 0;
-   for (index = 0; index  cb-nr_pages; index++) {
-   page = cb-compressed_pages[index];
-   page-mapping = NULL;
-   page_cache_release(page);
-   }
-
-   /* finally free the cb struct */
-   kfree(cb-compressed_pages);
-   kfree(cb);
 out:
bio_put(bio);
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Remove checkpatch errors in InterfaceMarcos.h

2014-07-23 Thread Nicholas Krause
This removes the two errors I get when running checkpatch on this
file. The first being not to use C99 comments and the second to
remove spacing issues with the define statement on line 7.

Signed-off-by: Nicholas Krause 
---
 drivers/staging/bcm/InterfaceMacros.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/bcm/InterfaceMacros.h 
b/drivers/staging/bcm/InterfaceMacros.h
index 7001caf..531aadf 100644
--- a/drivers/staging/bcm/InterfaceMacros.h
+++ b/drivers/staging/bcm/InterfaceMacros.h
@@ -4,13 +4,13 @@
 #define BCM_USB_MAX_READ_LENGTH 2048
 
 #define MAXIMUM_USB_TCB  128
-#define MAXIMUM_USB_RCB 128
+#define MAXIMUM_USB_RCB 128
 
 #define MAX_BUFFERS_PER_QUEUE   256
 
 #define MAX_DATA_BUFFER_SIZE2048
 
-//Num of Asynchronous reads pending
+/* Num of Asynchronous reads pending */
 #define NUM_RX_DESC 64
 
 #define SYS_CFG 0x0F000C00
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Join lines in IntefaceIdleMode.c

2014-07-23 Thread Nicholas Krause
This joins two lines that need to be joined as this improves
the coding style and makes it much easier to read.

Signed-off-by: Nicholas Krause 
---
 drivers/staging/bcm/InterfaceIdleMode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/bcm/InterfaceIdleMode.c 
b/drivers/staging/bcm/InterfaceIdleMode.c
index c84ee49..e075f0e 100644
--- a/drivers/staging/bcm/InterfaceIdleMode.c
+++ b/drivers/staging/bcm/InterfaceIdleMode.c
@@ -211,8 +211,7 @@ static int InterfaceAbortIdlemode(struct bcm_mini_adapter 
*Adapter,
else
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
IDLE_MODE, DBG_LVL_ALL,
-   "Number of completed iteration to"
-   "read chip-id :%lu", itr);
+   "Number of completed iteration to read chip-id 
:%lu", itr);
 
status = wrmalt(Adapter, SW_ABORT_IDLEMODE_LOC,
, sizeof(status));
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Fix space issues for header of headers.h

2014-07-23 Thread Nicholas Krause
This patch fixes the space errors checkpatch gives on this file
for the header of this file.

Signed-off-by: Nicholas Krause 
---
 drivers/staging/bcm/headers.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/bcm/headers.h b/drivers/staging/bcm/headers.h
index 6f3270c..af5b6df 100644
--- a/drivers/staging/bcm/headers.h
+++ b/drivers/staging/bcm/headers.h
@@ -1,6 +1,6 @@
 
 /***
-*  Headers.h
+* Headers.h
 ***/
 #ifndef __HEADERS_H__
 #define __HEADERS_H__
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Add blank line in sync.c

2014-07-23 Thread Nicholas Krause
This patch adds a blank line after line 708 as declared when
running checkpatch on this file.

Signed-off-by: Nicholas Krause 
---
 drivers/staging/android/sync.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index e7b2e02..0d37495 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -705,6 +705,7 @@ static long sync_fence_ioctl(struct file *file, unsigned 
int cmd,
 unsigned long arg)
 {
struct sync_fence *fence = file->private_data;
+
switch (cmd) {
case SYNC_IOC_WAIT:
return sync_fence_ioctl_wait(fence, arg);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Add blank lines in sw_sync.c

2014-07-23 Thread Nicholas Krause
This adds two blank lines as stated by checkpatch before lines,
100 and 159 respectively.

Signed-off-by: Nicholas Krause 
---
 drivers/staging/android/sw_sync.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/android/sw_sync.c 
b/drivers/staging/android/sw_sync.c
index a76db3f..863d4b1 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -97,6 +97,7 @@ static void sw_sync_pt_value_str(struct sync_pt *sync_pt,
   char *str, int size)
 {
struct sw_sync_pt *pt = (struct sw_sync_pt *)sync_pt;
+
snprintf(str, size, "%d", pt->value);
 }
 
@@ -156,6 +157,7 @@ static int sw_sync_open(struct inode *inode, struct file 
*file)
 static int sw_sync_release(struct inode *inode, struct file *file)
 {
struct sw_sync_timeline *obj = file->private_data;
+
sync_timeline_destroy(>obj);
return 0;
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Remove checkpatch error from ion.c

2014-07-23 Thread Nicholas Krause
This patch removes a checkpatch error by adding a line below
the definitions of the character array buf and the pointer path.

Signed-off-by: Nicholas Krause 
---
 drivers/staging/android/ion/ion.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 2703609..cad76ae 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -805,6 +805,7 @@ struct ion_client *ion_client_create(struct ion_device *dev,
client, _client_fops);
if (!client->debug_root) {
char buf[256], *path;
+
path = dentry_path(dev->clients_debug_root, buf, 256);
pr_err("Failed to create client debugfs at %s/%s\n",
path, client->display_name);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Change kzalloc to kcalloc

2014-07-23 Thread Nicholas Krause
This changes the call to kzalloc to kcalloc in ion_dummy_driver
for allocating the heap.

Signed-off-by: Nicholas Krause 
---
 drivers/staging/android/ion/ion_dummy_driver.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/ion/ion_dummy_driver.c 
b/drivers/staging/android/ion/ion_dummy_driver.c
index 3a45e79..8883432 100644
--- a/drivers/staging/android/ion/ion_dummy_driver.c
+++ b/drivers/staging/android/ion/ion_dummy_driver.c
@@ -67,9 +67,8 @@ static int __init ion_dummy_init(void)
 {
int i, err;
 
idev = ion_device_create(NULL);
-   heaps = kzalloc(sizeof(struct ion_heap *) * dummy_ion_pdata.nr,
-   GFP_KERNEL);
+   heaps = kcalloc(*dummy_ion_pdata.nr , sizeof((struct ion_heap *) 
*dummy_ion_pdata.nr) , GFP_KERNEL);
if (!heaps)
return -ENOMEM;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Remove checkpatch errors in ion.c for android staging

2014-07-23 Thread Nicholas Krause
This patch removes a few errors that checkpatch gives when run
on ion.c. I didn't remove the warning from returning in a void
function as we need to write ion_dma_buf_kunmap and I have no
idea how to do this as all we are doing in this function as of now
is returning and leaking the memory allocated in ion_dma_buf_kmap.

Signed-off-by: Nicholas Krause 
---
 drivers/staging/android/ion/ion.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 389b8f6..934d55d 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -56,6 +56,7 @@ struct ion_device {
struct mutex buffer_lock;
struct rw_semaphore lock;
struct plist_head heaps;
+
long (*custom_ioctl)(struct ion_client *client, unsigned int cmd,
 unsigned long arg);
struct rb_root clients;
@@ -805,6 +806,7 @@ struct ion_client *ion_client_create(struct ion_device *dev,
client, _client_fops);
if (!client->debug_root) {
char buf[256], *path;
+
path = dentry_path(dev->clients_debug_root, buf, 256);
pr_err("Failed to create client debugfs at %s/%s\n",
path, client->display_name);
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] avr32: Remove unnessary variables from page.h

2014-07-23 Thread Nicholas Krause
This removes the unneeded variables memory_start and memory_end in
order to fix this fix me message.

Signed-off-by: Nicholas Krause 
---
 arch/avr32/include/asm/page.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/avr32/include/asm/page.h b/arch/avr32/include/asm/page.h
index f805d1c..701006f 100644
--- a/arch/avr32/include/asm/page.h
+++ b/arch/avr32/include/asm/page.h
@@ -42,8 +42,6 @@ typedef struct page *pgtable_t;
 #define __pgd(x)   ((pgd_t) { (x) })
 #define __pgprot(x)((pgprot_t) { (x) })
 
-/* FIXME: These should be removed soon */
-extern unsigned long memory_start, memory_end;
 
 /* Pure 2^n version of get_order */
 static inline int get_order(unsigned long size)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] avr32: Remove unnessary variables from page.h

2014-07-23 Thread Nicholas Krause
This removes the unneeded variables memory_start and memory_end in
order to fix this fix me message.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 arch/avr32/include/asm/page.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/avr32/include/asm/page.h b/arch/avr32/include/asm/page.h
index f805d1c..701006f 100644
--- a/arch/avr32/include/asm/page.h
+++ b/arch/avr32/include/asm/page.h
@@ -42,8 +42,6 @@ typedef struct page *pgtable_t;
 #define __pgd(x)   ((pgd_t) { (x) })
 #define __pgprot(x)((pgprot_t) { (x) })
 
-/* FIXME: These should be removed soon */
-extern unsigned long memory_start, memory_end;
 
 /* Pure 2^n version of get_order */
 static inline int get_order(unsigned long size)
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Remove checkpatch errors in ion.c for android staging

2014-07-23 Thread Nicholas Krause
This patch removes a few errors that checkpatch gives when run
on ion.c. I didn't remove the warning from returning in a void
function as we need to write ion_dma_buf_kunmap and I have no
idea how to do this as all we are doing in this function as of now
is returning and leaking the memory allocated in ion_dma_buf_kmap.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/staging/android/ion/ion.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 389b8f6..934d55d 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -56,6 +56,7 @@ struct ion_device {
struct mutex buffer_lock;
struct rw_semaphore lock;
struct plist_head heaps;
+
long (*custom_ioctl)(struct ion_client *client, unsigned int cmd,
 unsigned long arg);
struct rb_root clients;
@@ -805,6 +806,7 @@ struct ion_client *ion_client_create(struct ion_device *dev,
client, debug_client_fops);
if (!client-debug_root) {
char buf[256], *path;
+
path = dentry_path(dev-clients_debug_root, buf, 256);
pr_err(Failed to create client debugfs at %s/%s\n,
path, client-display_name);
--
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Change kzalloc to kcalloc

2014-07-23 Thread Nicholas Krause
This changes the call to kzalloc to kcalloc in ion_dummy_driver
for allocating the heap.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/staging/android/ion/ion_dummy_driver.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/ion/ion_dummy_driver.c 
b/drivers/staging/android/ion/ion_dummy_driver.c
index 3a45e79..8883432 100644
--- a/drivers/staging/android/ion/ion_dummy_driver.c
+++ b/drivers/staging/android/ion/ion_dummy_driver.c
@@ -67,9 +67,8 @@ static int __init ion_dummy_init(void)
 {
int i, err;
 
idev = ion_device_create(NULL);
-   heaps = kzalloc(sizeof(struct ion_heap *) * dummy_ion_pdata.nr,
-   GFP_KERNEL);
+   heaps = kcalloc(*dummy_ion_pdata.nr , sizeof((struct ion_heap *) 
*dummy_ion_pdata.nr) , GFP_KERNEL);
if (!heaps)
return -ENOMEM;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Remove checkpatch error from ion.c

2014-07-23 Thread Nicholas Krause
This patch removes a checkpatch error by adding a line below
the definitions of the character array buf and the pointer path.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/staging/android/ion/ion.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 2703609..cad76ae 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -805,6 +805,7 @@ struct ion_client *ion_client_create(struct ion_device *dev,
client, debug_client_fops);
if (!client-debug_root) {
char buf[256], *path;
+
path = dentry_path(dev-clients_debug_root, buf, 256);
pr_err(Failed to create client debugfs at %s/%s\n,
path, client-display_name);
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Add blank lines in sw_sync.c

2014-07-23 Thread Nicholas Krause
This adds two blank lines as stated by checkpatch before lines,
100 and 159 respectively.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/staging/android/sw_sync.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/android/sw_sync.c 
b/drivers/staging/android/sw_sync.c
index a76db3f..863d4b1 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -97,6 +97,7 @@ static void sw_sync_pt_value_str(struct sync_pt *sync_pt,
   char *str, int size)
 {
struct sw_sync_pt *pt = (struct sw_sync_pt *)sync_pt;
+
snprintf(str, size, %d, pt-value);
 }
 
@@ -156,6 +157,7 @@ static int sw_sync_open(struct inode *inode, struct file 
*file)
 static int sw_sync_release(struct inode *inode, struct file *file)
 {
struct sw_sync_timeline *obj = file-private_data;
+
sync_timeline_destroy(obj-obj);
return 0;
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Add blank line in sync.c

2014-07-23 Thread Nicholas Krause
This patch adds a blank line after line 708 as declared when
running checkpatch on this file.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/staging/android/sync.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index e7b2e02..0d37495 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -705,6 +705,7 @@ static long sync_fence_ioctl(struct file *file, unsigned 
int cmd,
 unsigned long arg)
 {
struct sync_fence *fence = file-private_data;
+
switch (cmd) {
case SYNC_IOC_WAIT:
return sync_fence_ioctl_wait(fence, arg);
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Fix space issues for header of headers.h

2014-07-23 Thread Nicholas Krause
This patch fixes the space errors checkpatch gives on this file
for the header of this file.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/staging/bcm/headers.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/bcm/headers.h b/drivers/staging/bcm/headers.h
index 6f3270c..af5b6df 100644
--- a/drivers/staging/bcm/headers.h
+++ b/drivers/staging/bcm/headers.h
@@ -1,6 +1,6 @@
 
 /***
-*  Headers.h
+* Headers.h
 ***/
 #ifndef __HEADERS_H__
 #define __HEADERS_H__
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Join lines in IntefaceIdleMode.c

2014-07-23 Thread Nicholas Krause
This joins two lines that need to be joined as this improves
the coding style and makes it much easier to read.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/staging/bcm/InterfaceIdleMode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/bcm/InterfaceIdleMode.c 
b/drivers/staging/bcm/InterfaceIdleMode.c
index c84ee49..e075f0e 100644
--- a/drivers/staging/bcm/InterfaceIdleMode.c
+++ b/drivers/staging/bcm/InterfaceIdleMode.c
@@ -211,8 +211,7 @@ static int InterfaceAbortIdlemode(struct bcm_mini_adapter 
*Adapter,
else
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
IDLE_MODE, DBG_LVL_ALL,
-   Number of completed iteration to
-   read chip-id :%lu, itr);
+   Number of completed iteration to read chip-id 
:%lu, itr);
 
status = wrmalt(Adapter, SW_ABORT_IDLEMODE_LOC,
Pattern, sizeof(status));
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: Remove checkpatch errors in InterfaceMarcos.h

2014-07-23 Thread Nicholas Krause
This removes the two errors I get when running checkpatch on this
file. The first being not to use C99 comments and the second to
remove spacing issues with the define statement on line 7.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/staging/bcm/InterfaceMacros.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/bcm/InterfaceMacros.h 
b/drivers/staging/bcm/InterfaceMacros.h
index 7001caf..531aadf 100644
--- a/drivers/staging/bcm/InterfaceMacros.h
+++ b/drivers/staging/bcm/InterfaceMacros.h
@@ -4,13 +4,13 @@
 #define BCM_USB_MAX_READ_LENGTH 2048
 
 #define MAXIMUM_USB_TCB  128
-#define MAXIMUM_USB_RCB 128
+#define MAXIMUM_USB_RCB 128
 
 #define MAX_BUFFERS_PER_QUEUE   256
 
 #define MAX_DATA_BUFFER_SIZE2048
 
-//Num of Asynchronous reads pending
+/* Num of Asynchronous reads pending */
 #define NUM_RX_DESC 64
 
 #define SYS_CFG 0x0F000C00
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] microblaze: Add comment for defines

2014-07-22 Thread Nicholas Krause
This adds a comment for and removes a fix me by labeling these
defines as memory cache definitions.

Signed-off-by: Nicholas Krause 
---
 arch/microblaze/include/asm/pvr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/microblaze/include/asm/pvr.h 
b/arch/microblaze/include/asm/pvr.h
index 4bbdb4c..441f3a0 100644
--- a/arch/microblaze/include/asm/pvr.h
+++ b/arch/microblaze/include/asm/pvr.h
@@ -186,7 +186,7 @@ struct pvr_s {
 #define PVR_DCACHE_USE_FSL(_pvr)   (_pvr.pvr[5] & PVR5_DCACHE_USE_FSL_MASK)
 #define PVR_DCACHE_ALLOW_WR(_pvr) \
(_pvr.pvr[5] & PVR5_DCACHE_ALLOW_WR_MASK)
-/* FIXME two shifts on one line needs any comment */
+/* memory caches */
 #define PVR_DCACHE_LINE_LEN(_pvr) \
(1 << ((_pvr.pvr[5] & PVR5_DCACHE_LINE_LEN_MASK) >> 21))
 #define PVR_DCACHE_BYTE_SIZE(_pvr) \
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] m68k: Remove printk statement and add return statement in q40ints.c

2014-07-22 Thread Nicholas Krause
This removes the printk statement for irqs not defined by the hardware in
function q40_irq_startup and instead returns -ENXIO as stated by the fix
me message.

Signed-off-by: Nicholas Krause 
---
 arch/m68k/q40/q40ints.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index 513f9bb..86f05c0 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -48,8 +48,7 @@ static unsigned int q40_irq_startup(struct irq_data *data)
switch (irq) {
case 1: case 2: case 8: case 9:
case 11: case 12: case 13:
-   printk("%s: ISA IRQ %d not implemented by HW\n", __func__, irq);
-   /* FIXME return -ENXIO; */
+   return -ENXIO;
}
return 0;
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] x86: Remove Fix me in main.c and add include statement for kvm_para.h

2014-07-22 Thread Nicholas Krause
This patch removes a fix me by including linux/types.h in kvm_para.h
as stated by the  fix me in main.c and also removes the comment from
main.c too.

Signed-off-by: Nicholas Krause 
---
 arch/x86/kernel/cpu/mtrr/main.c | 2 +-
 include/linux/kvm_para.h| 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index f961de9..7ba314b 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -33,7 +33,7 @@
 
 #define DEBUG
 
-#include  /* FIXME: kvm_para.h needs this */
+#include 
 
 #include 
 #include 
diff --git a/include/linux/kvm_para.h b/include/linux/kvm_para.h
index 00a97bb..21d1be2 100644
--- a/include/linux/kvm_para.h
+++ b/include/linux/kvm_para.h
@@ -2,8 +2,7 @@
 #define __LINUX_KVM_PARA_H
 
 #include 
-
-
+#include 
 static inline int kvm_para_has_feature(unsigned int feature)
 {
if (kvm_arch_para_features() & (1UL << feature))
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] drbd: Remove fix me statements

2014-07-22 Thread Nicholas Krause
This removes no longer needed fix me statements as the spinlocks
are needed to protect against other users of the list accessing
 it when items on it are being moved off it.

Signed-off-by: Nicholas Krause 
---
 drivers/block/drbd/drbd_worker.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index d8f57b6..8793a32 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -1847,12 +1847,12 @@ static void wait_for_work(struct drbd_connection 
*connection, struct list_head *
int send_barrier;
prepare_to_wait(>sender_work.q_wait, , 
TASK_INTERRUPTIBLE);
spin_lock_irq(>resource->req_lock);
-   spin_lock(>sender_work.q_lock); /* FIXME get 
rid of this one? */
+   spin_lock(>sender_work.q_lock);
/* dequeue single item only,
 * we still use drbd_queue_work_front() in some places */
if (!list_empty(>sender_work.q))
list_move(connection->sender_work.q.next, work_list);
-   spin_unlock(>sender_work.q_lock);   /* FIXME get 
rid of this one? */
+   spin_unlock(>sender_work.q_lock);
if (!list_empty(work_list) || signal_pending(current)) {
spin_unlock_irq(>resource->req_lock);
break;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] s390: Fix me in dasd_eer.c

2014-07-22 Thread Nicholas Krause
This patch changes return type to EMEDUIMTYPE in function, dasd_eer_enable
for when checking if the medium has no errors according to this function.

Signed-off-by: Nicholas Krause 
---
 drivers/s390/block/dasd_eer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c
index 21ef63c..08ee040 100644
--- a/drivers/s390/block/dasd_eer.c
+++ b/drivers/s390/block/dasd_eer.c
@@ -462,7 +462,7 @@ int dasd_eer_enable(struct dasd_device *device)
return 0;
 
if (!device->discipline || strcmp(device->discipline->name, "ECKD"))
-   return -EPERM;  /* FIXME: -EMEDIUMTYPE ? */
+   return -EMEDIUMTYPE;/* FIXME: -EMEDIUMTYPE ? */
 
cqr = dasd_kmalloc_request(DASD_ECKD_MAGIC, 1 /* SNSS */,
   SNSS_DATA_SIZE, device);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] s390: Fix me in dasd_eer.c

2014-07-22 Thread Nicholas Krause
This patch changes return type to EMEDUIMTYPE in function, dasd_eer_enable
for when checking if the medium has no errors according to this function.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/s390/block/dasd_eer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c
index 21ef63c..08ee040 100644
--- a/drivers/s390/block/dasd_eer.c
+++ b/drivers/s390/block/dasd_eer.c
@@ -462,7 +462,7 @@ int dasd_eer_enable(struct dasd_device *device)
return 0;
 
if (!device-discipline || strcmp(device-discipline-name, ECKD))
-   return -EPERM;  /* FIXME: -EMEDIUMTYPE ? */
+   return -EMEDIUMTYPE;/* FIXME: -EMEDIUMTYPE ? */
 
cqr = dasd_kmalloc_request(DASD_ECKD_MAGIC, 1 /* SNSS */,
   SNSS_DATA_SIZE, device);
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] drbd: Remove fix me statements

2014-07-22 Thread Nicholas Krause
This removes no longer needed fix me statements as the spinlocks
are needed to protect against other users of the list accessing
 it when items on it are being moved off it.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/block/drbd/drbd_worker.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index d8f57b6..8793a32 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -1847,12 +1847,12 @@ static void wait_for_work(struct drbd_connection 
*connection, struct list_head *
int send_barrier;
prepare_to_wait(connection-sender_work.q_wait, wait, 
TASK_INTERRUPTIBLE);
spin_lock_irq(connection-resource-req_lock);
-   spin_lock(connection-sender_work.q_lock); /* FIXME get 
rid of this one? */
+   spin_lock(connection-sender_work.q_lock);
/* dequeue single item only,
 * we still use drbd_queue_work_front() in some places */
if (!list_empty(connection-sender_work.q))
list_move(connection-sender_work.q.next, work_list);
-   spin_unlock(connection-sender_work.q_lock);   /* FIXME get 
rid of this one? */
+   spin_unlock(connection-sender_work.q_lock);
if (!list_empty(work_list) || signal_pending(current)) {
spin_unlock_irq(connection-resource-req_lock);
break;
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] x86: Remove Fix me in main.c and add include statement for kvm_para.h

2014-07-22 Thread Nicholas Krause
This patch removes a fix me by including linux/types.h in kvm_para.h
as stated by the  fix me in main.c and also removes the comment from
main.c too.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 arch/x86/kernel/cpu/mtrr/main.c | 2 +-
 include/linux/kvm_para.h| 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index f961de9..7ba314b 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -33,7 +33,7 @@
 
 #define DEBUG
 
-#include linux/types.h /* FIXME: kvm_para.h needs this */
+#include linux/types.h
 
 #include linux/stop_machine.h
 #include linux/kvm_para.h
diff --git a/include/linux/kvm_para.h b/include/linux/kvm_para.h
index 00a97bb..21d1be2 100644
--- a/include/linux/kvm_para.h
+++ b/include/linux/kvm_para.h
@@ -2,8 +2,7 @@
 #define __LINUX_KVM_PARA_H
 
 #include uapi/linux/kvm_para.h
-
-
+#include linux/types.h
 static inline int kvm_para_has_feature(unsigned int feature)
 {
if (kvm_arch_para_features()  (1UL  feature))
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] m68k: Remove printk statement and add return statement in q40ints.c

2014-07-22 Thread Nicholas Krause
This removes the printk statement for irqs not defined by the hardware in
function q40_irq_startup and instead returns -ENXIO as stated by the fix
me message.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 arch/m68k/q40/q40ints.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index 513f9bb..86f05c0 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -48,8 +48,7 @@ static unsigned int q40_irq_startup(struct irq_data *data)
switch (irq) {
case 1: case 2: case 8: case 9:
case 11: case 12: case 13:
-   printk(%s: ISA IRQ %d not implemented by HW\n, __func__, irq);
-   /* FIXME return -ENXIO; */
+   return -ENXIO;
}
return 0;
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] microblaze: Add comment for defines

2014-07-22 Thread Nicholas Krause
This adds a comment for and removes a fix me by labeling these
defines as memory cache definitions.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 arch/microblaze/include/asm/pvr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/microblaze/include/asm/pvr.h 
b/arch/microblaze/include/asm/pvr.h
index 4bbdb4c..441f3a0 100644
--- a/arch/microblaze/include/asm/pvr.h
+++ b/arch/microblaze/include/asm/pvr.h
@@ -186,7 +186,7 @@ struct pvr_s {
 #define PVR_DCACHE_USE_FSL(_pvr)   (_pvr.pvr[5]  PVR5_DCACHE_USE_FSL_MASK)
 #define PVR_DCACHE_ALLOW_WR(_pvr) \
(_pvr.pvr[5]  PVR5_DCACHE_ALLOW_WR_MASK)
-/* FIXME two shifts on one line needs any comment */
+/* memory caches */
 #define PVR_DCACHE_LINE_LEN(_pvr) \
(1  ((_pvr.pvr[5]  PVR5_DCACHE_LINE_LEN_MASK)  21))
 #define PVR_DCACHE_BYTE_SIZE(_pvr) \
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] edac: Remove fixmes in e7xxx_edac.c

2014-07-21 Thread Nicholas Krause
This removes two Page shift fixs me in this file and not checking
if row is -1 in process_ce as it cannot be this value or be must
exit this function by returning.

Signed-off-by: Nicholas Krause 
---
 drivers/edac/e7xxx_edac.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index 3cda79b..563983f 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -211,12 +211,13 @@ static void process_ce(struct mem_ctl_info *mci, struct 
e7xxx_error_info *info)
edac_dbg(3, "\n");
/* read the error address */
error_1b = info->dram_celog_add;
-   /* FIXME - should use PAGE_SHIFT */
-   page = error_1b >> 6;   /* convert the address to 4k page */
+   page = error_1b >> PAGE_SHIFT;  /* convert the address to 4k page */
/* read the syndrome */
syndrome = info->dram_celog_syndrome;
-   /* FIXME - check for -1 */
row = edac_mc_find_csrow_by_page(mci, page);
+   if (row == -1)
+   return;
/* convert syndrome to channel */
channel = e7xxx_find_channel(syndrome);
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, page, 0, syndrome,
@@ -238,8 +239,7 @@ static void process_ue(struct mem_ctl_info *mci, struct 
e7xxx_error_info *info)
edac_dbg(3, "\n");
/* read the error address */
error_2b = info->dram_uelog_add;
-   /* FIXME - should use PAGE_SHIFT */
-   block_page = error_2b >> 6; /* convert to 4k address */
+   block_page = error_2b >> PAGE_SHIFT;/* convert to 4k address */
row = edac_mc_find_csrow_by_page(mci, block_page);
 
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, block_page, 0, 0,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] edac: Remove fixmes in e7xxx_edac.c

2014-07-21 Thread Nicholas Krause
This removes two Page shift fixs me in this file and not checking
if row is -1 in process_ce as it cannot be this value or be must
exit this function by returning.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/edac/e7xxx_edac.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index 3cda79b..563983f 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -211,12 +211,13 @@ static void process_ce(struct mem_ctl_info *mci, struct 
e7xxx_error_info *info)
edac_dbg(3, \n);
/* read the error address */
error_1b = info-dram_celog_add;
-   /* FIXME - should use PAGE_SHIFT */
-   page = error_1b  6;   /* convert the address to 4k page */
+   page = error_1b  PAGE_SHIFT;  /* convert the address to 4k page */
/* read the syndrome */
syndrome = info-dram_celog_syndrome;
-   /* FIXME - check for -1 */
row = edac_mc_find_csrow_by_page(mci, page);
+   if (row == -1)
+   return;
/* convert syndrome to channel */
channel = e7xxx_find_channel(syndrome);
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, page, 0, syndrome,
@@ -238,8 +239,7 @@ static void process_ue(struct mem_ctl_info *mci, struct 
e7xxx_error_info *info)
edac_dbg(3, \n);
/* read the error address */
error_2b = info-dram_uelog_add;
-   /* FIXME - should use PAGE_SHIFT */
-   block_page = error_2b  6; /* convert to 4k address */
+   block_page = error_2b  PAGE_SHIFT;/* convert to 4k address */
row = edac_mc_find_csrow_by_page(mci, block_page);
 
edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, block_page, 0, 0,
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] arm: Fix me in bios32.c

2014-07-19 Thread Nicholas Krause
This fixs a fix me in bios32.c for pci_fixup_it8152 as this if
statement is incorrect needs to be checked against the class bits
not the whole address for the two or conditions and since they don't
have define statements outside of their numeratical value.

Signed-off-by: Nicholas Krause 
---
 arch/arm/kernel/bios32.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 17a26c1..b2217af 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -254,11 +254,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, 
PCI_DEVICE_ID_CONTAQ_82C693, pci_
 static void pci_fixup_it8152(struct pci_dev *dev)
 {
int i;
-   /* fixup for ITE 8152 devices */
-   /* FIXME: add defines for class 0x68000 and 0x80103 */
if ((dev->class >> 8) == PCI_CLASS_BRIDGE_HOST ||
-   dev->class == 0x68000 ||
-   dev->class == 0x80103) {
+  (dev->class >> 8) == 0x680 ||
+  (dev->class >> 8) == 0x801) {
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
dev->resource[i].start = 0;
dev->resource[i].end   = 0;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] arm: Fix me in bios32.c

2014-07-19 Thread Nicholas Krause
This fixs a fix me in bios32.c for pci_fixup_it8152 as this if
statement is incorrect needs to be checked against the class bits
not the whole address for the two or conditions and since they don't
have define statements outside of their numeratical value.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 arch/arm/kernel/bios32.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 17a26c1..b2217af 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -254,11 +254,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, 
PCI_DEVICE_ID_CONTAQ_82C693, pci_
 static void pci_fixup_it8152(struct pci_dev *dev)
 {
int i;
-   /* fixup for ITE 8152 devices */
-   /* FIXME: add defines for class 0x68000 and 0x80103 */
if ((dev-class  8) == PCI_CLASS_BRIDGE_HOST ||
-   dev-class == 0x68000 ||
-   dev-class == 0x80103) {
+  (dev-class  8) == 0x680 ||
+  (dev-class  8) == 0x801) {
for (i = 0; i  PCI_NUM_RESOURCES; i++) {
dev-resource[i].start = 0;
dev-resource[i].end   = 0;
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] mips: Remove uneeded line in cmp_smp_finish

2014-07-18 Thread Nicholas Krause
This patch removes a unneeded line from this file as stated by the
fix me in this file.

Signed-off-by: Nicholas Krause 
---
 arch/mips/kernel/smp-cmp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c
index fc8a515..61bfa20 100644
--- a/arch/mips/kernel/smp-cmp.c
+++ b/arch/mips/kernel/smp-cmp.c
@@ -60,8 +60,6 @@ static void cmp_smp_finish(void)
 {
pr_debug("SMPCMP: CPU%d: %s\n", smp_processor_id(), __func__);
 
-   /* CDFIXME: remove this? */
-   write_c0_compare(read_c0_count() + (8 * mips_hpt_frequency / HZ));
 
 #ifdef CONFIG_MIPS_MT_FPAFF
/* If we have an FPU, enroll ourselves in the FPU-full mask */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] parisc: Remove FIXME comment

2014-07-18 Thread Nicholas Krause
The comment for size of frame not being needed is incorrect , the
function called needs this parameter.

Signed-off-by: Nicholas Krause 
---
 arch/parisc/kernel/signal.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index 1cba8f2..1d550b5 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
@@ -240,7 +240,6 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t 
*info,
 #endif

usp = (regs->gr[30] & ~(0x01UL));
-   /*FIXME: frame_size parameter is unused, remove it. */
frame = get_sigframe(ka, usp, sizeof(*frame));
 
DBG(1,"SETUP_RT_FRAME: START\n");
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] usb-core: Remove Fix mes in file hcd.c

2014-07-18 Thread Nicholas Krause
I am removing two fix mes in this file as after dicussing then it  seems
there is no reason to check against Null for usb_device as it can never
be NULL and this is check is therefore not needed.

Signed-off-by: Nicholas Krause 
---
 drivers/usb/core/hcd.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index bec31e2..487abcf 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
struct usb_bus *usb_bus = rh_usb_dev->bus;
struct usb_hcd *usb_hcd;
 
-   if (usb_bus == NULL)/* FIXME: not sure if this case is possible */
-   return -ENODEV;
usb_hcd = bus_to_hcd(usb_bus);
return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
 }
@@ -871,8 +869,6 @@ static ssize_t authorized_default_store(struct device *dev,
struct usb_bus *usb_bus = rh_usb_dev->bus;
struct usb_hcd *usb_hcd;
 
-   if (usb_bus == NULL)/* FIXME: not sure if this case is possible */
-   return -ENODEV;
usb_hcd = bus_to_hcd(usb_bus);
result = sscanf(buf, "%u\n", );
if (result == 1) {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] usb-core: Remove Fix mes in file hcd.c

2014-07-18 Thread Nicholas Krause
I am removing two fix mes in this file as after dicussing then it  seems
there is no reason to check against Null for usb_device as it can never
be NULL and this is check is therefore not needed.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 drivers/usb/core/hcd.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index bec31e2..487abcf 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
struct usb_bus *usb_bus = rh_usb_dev-bus;
struct usb_hcd *usb_hcd;
 
-   if (usb_bus == NULL)/* FIXME: not sure if this case is possible */
-   return -ENODEV;
usb_hcd = bus_to_hcd(usb_bus);
return snprintf(buf, PAGE_SIZE, %u\n, usb_hcd-authorized_default);
 }
@@ -871,8 +869,6 @@ static ssize_t authorized_default_store(struct device *dev,
struct usb_bus *usb_bus = rh_usb_dev-bus;
struct usb_hcd *usb_hcd;
 
-   if (usb_bus == NULL)/* FIXME: not sure if this case is possible */
-   return -ENODEV;
usb_hcd = bus_to_hcd(usb_bus);
result = sscanf(buf, %u\n, val);
if (result == 1) {
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] parisc: Remove FIXME comment

2014-07-18 Thread Nicholas Krause
The comment for size of frame not being needed is incorrect , the
function called needs this parameter.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 arch/parisc/kernel/signal.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index 1cba8f2..1d550b5 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
@@ -240,7 +240,6 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t 
*info,
 #endif

usp = (regs-gr[30]  ~(0x01UL));
-   /*FIXME: frame_size parameter is unused, remove it. */
frame = get_sigframe(ka, usp, sizeof(*frame));
 
DBG(1,SETUP_RT_FRAME: START\n);
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] mips: Remove uneeded line in cmp_smp_finish

2014-07-18 Thread Nicholas Krause
This patch removes a unneeded line from this file as stated by the
fix me in this file.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 arch/mips/kernel/smp-cmp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c
index fc8a515..61bfa20 100644
--- a/arch/mips/kernel/smp-cmp.c
+++ b/arch/mips/kernel/smp-cmp.c
@@ -60,8 +60,6 @@ static void cmp_smp_finish(void)
 {
pr_debug(SMPCMP: CPU%d: %s\n, smp_processor_id(), __func__);
 
-   /* CDFIXME: remove this? */
-   write_c0_compare(read_c0_count() + (8 * mips_hpt_frequency / HZ));
 
 #ifdef CONFIG_MIPS_MT_FPAFF
/* If we have an FPU, enroll ourselves in the FPU-full mask */
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] ia64: Fix me add register r8

2014-07-17 Thread Nicholas Krause
The function user_stack_pointer was not returning the correct value \
as stated by a Fix Me message before the function declaration. I
fixed the return value to add register r8 as that register stores
dirty pages.

Signed-off-by: Nicholas Krause 
---
 arch/ia64/include/asm/ptrace.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/ia64/include/asm/ptrace.h b/arch/ia64/include/asm/ptrace.h
index 8451439..eaef692 100644
--- a/arch/ia64/include/asm/ptrace.h
+++ b/arch/ia64/include/asm/ptrace.h
@@ -53,8 +53,7 @@
 
 static inline unsigned long user_stack_pointer(struct pt_regs *regs)
 {
-   /* FIXME: should this be bspstore + nr_dirty regs? */
-   return regs->ar_bspstore;
+   return regs->ar_bspstore + regs->r8;
 }
 
 static inline int is_syscall_success(struct pt_regs *regs)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] ia64: Fix me add register r8

2014-07-17 Thread Nicholas Krause
The function user_stack_pointer was not returning the correct value \
as stated by a Fix Me message before the function declaration. I
fixed the return value to add register r8 as that register stores
dirty pages.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 arch/ia64/include/asm/ptrace.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/ia64/include/asm/ptrace.h b/arch/ia64/include/asm/ptrace.h
index 8451439..eaef692 100644
--- a/arch/ia64/include/asm/ptrace.h
+++ b/arch/ia64/include/asm/ptrace.h
@@ -53,8 +53,7 @@
 
 static inline unsigned long user_stack_pointer(struct pt_regs *regs)
 {
-   /* FIXME: should this be bspstore + nr_dirty regs? */
-   return regs-ar_bspstore;
+   return regs-ar_bspstore + regs-r8;
 }
 
 static inline int is_syscall_success(struct pt_regs *regs)
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] m68k: Remove unneeded FIXME message in sun3_pgalloc.h

2014-07-16 Thread Nicholas Krause
This removes a FIX ME message due to this file not compiling.
Now that this message is no longer needed I am removing it
from sun3_pgalloc.h.

Signed-off-by: Nicholas Krause 
---
 arch/m68k/include/asm/sun3_pgalloc.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/m68k/include/asm/sun3_pgalloc.h 
b/arch/m68k/include/asm/sun3_pgalloc.h
index f868506..66644f3 100644
--- a/arch/m68k/include/asm/sun3_pgalloc.h
+++ b/arch/m68k/include/asm/sun3_pgalloc.h
@@ -12,8 +12,6 @@
 
 #include 
 
-/* FIXME - when we get this compiling */
-/* erm, now that it's compiling, what do we do with it? */
 #define _KERNPG_TABLE 0
 
 extern const char bad_pmd_string[];
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] m68k: Remove unneeded FIXME message in sun3_pgalloc.h

2014-07-16 Thread Nicholas Krause
This removes a FIX ME message due to this file not compiling.
Now that this message is no longer needed I am removing it
from sun3_pgalloc.h.

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 arch/m68k/include/asm/sun3_pgalloc.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/m68k/include/asm/sun3_pgalloc.h 
b/arch/m68k/include/asm/sun3_pgalloc.h
index f868506..66644f3 100644
--- a/arch/m68k/include/asm/sun3_pgalloc.h
+++ b/arch/m68k/include/asm/sun3_pgalloc.h
@@ -12,8 +12,6 @@
 
 #include asm/tlb.h
 
-/* FIXME - when we get this compiling */
-/* erm, now that it's compiling, what do we do with it? */
 #define _KERNPG_TABLE 0
 
 extern const char bad_pmd_string[];
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/4] alpha: checkpatch errors in mkbb for if statements

2014-07-15 Thread Nicholas Krause
This patch fixes all errors related to no space between if and parthesises
to remove this errors when running checkpatch against this file.
---
 arch/alpha/boot/tools/mkbb.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/alpha/boot/tools/mkbb.c b/arch/alpha/boot/tools/mkbb.c
index 6f1b957..214b6c7 100644
--- a/arch/alpha/boot/tools/mkbb.c
+++ b/arch/alpha/boot/tools/mkbb.c
@@ -91,21 +91,21 @@ int main(int argc, char ** argv)
int nread;
 
 /* Make sure of the arg count */
-   if(argc != 3) {
+   if (argc != 3) {
fprintf(stderr, "Usage: %s device lxboot\n", argv[0]);
exit(0);
}
 
 /* First, open the device and make sure it's accessible */
dev = open(argv[1], O_RDWR);
-   if(dev < 0) {
+   if (dev < 0) {
perror(argv[1]);
exit(0);
}
 
 /* Now open the lxboot and make sure it's reasonable */
fd = open(argv[2], O_RDONLY);
-   if(fd < 0) {
+   if (fd < 0) {
perror(argv[2]);
close(dev);
exit(0);
@@ -113,7 +113,7 @@ int main(int argc, char ** argv)
 
 /* Read in the lxboot */
nread = read(fd, _image, sizeof(bootblock));
-   if(nread != sizeof(bootblock)) {
+   if (nread != sizeof(bootblock)) {
perror("lxboot read");
fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread);
exit(0);
@@ -121,7 +121,7 @@ int main(int argc, char ** argv)
 
 /* Read in the bootblock from disk. */
nread = read(dev, _from_disk, sizeof(bootblock));
-   if(nread != sizeof(bootblock)) {
+   if (nread != sizeof(bootblock)) {
perror("bootblock read");
fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread);
exit(0);
@@ -132,14 +132,14 @@ int main(int argc, char ** argv)
 
 /* Calculate the bootblock checksum */
bootloader_image.bootblock_checksum = 0;
-   for(i = 0; i < 63; i++) {
+   for (i = 0; i < 63; i++) {
bootloader_image.bootblock_checksum +=
bootloader_image.bootblock_quadwords[i];
}
 
 /* Write the whole thing out! */
lseek(dev, 0L, SEEK_SET);
-   if(write(dev, _image, sizeof(bootblock)) != 
sizeof(bootblock)) {
+   if (write(dev, _image, sizeof(bootblock)) != 
sizeof(bootblock)) {
perror("bootblock write");
exit(0);
}
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/4] alpha: Indent if Statements properly

2014-07-15 Thread Nicholas Krause
This patch removes the errors this file gets with checkpatch due
to errors relating to if statements and their enclosing statements
not being indented properly.
---
 arch/alpha/boot/tools/mkbb.c | 34 +-
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/arch/alpha/boot/tools/mkbb.c b/arch/alpha/boot/tools/mkbb.c
index 214b6c7..69f347e 100644
--- a/arch/alpha/boot/tools/mkbb.c
+++ b/arch/alpha/boot/tools/mkbb.c
@@ -92,39 +92,39 @@ int main(int argc, char ** argv)
 
 /* Make sure of the arg count */
if (argc != 3) {
-   fprintf(stderr, "Usage: %s device lxboot\n", argv[0]);
-   exit(0);
+   fprintf(stderr, "Usage: %s device lxboot\n", argv[0]);
+   exit(0);
}
 
 /* First, open the device and make sure it's accessible */
dev = open(argv[1], O_RDWR);
-   if (dev < 0) {
-   perror(argv[1]);
-   exit(0);
+   if (dev < 0) {
+   perror(argv[1]);
+   exit(0);
}
 
 /* Now open the lxboot and make sure it's reasonable */
fd = open(argv[2], O_RDONLY);
if (fd < 0) {
-   perror(argv[2]);
-   close(dev);
-   exit(0);
+   perror(argv[2]);
+   close(dev);
+   exit(0);
}
 
 /* Read in the lxboot */
nread = read(fd, _image, sizeof(bootblock));
if (nread != sizeof(bootblock)) {
-   perror("lxboot read");
-   fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread);
-   exit(0);
+   perror("lxboot read");
+   fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), 
nread);
+   exit(0);
}
 
 /* Read in the bootblock from disk. */
nread = read(dev, _from_disk, sizeof(bootblock));
if (nread != sizeof(bootblock)) {
-   perror("bootblock read");
-   fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread);
-   exit(0);
+   perror("bootblock read");
+   fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), 
nread);
+   exit(0);
}
 
 /* Swap the bootblock's disklabel into the bootloader */
@@ -133,15 +133,15 @@ int main(int argc, char ** argv)
 /* Calculate the bootblock checksum */
bootloader_image.bootblock_checksum = 0;
for (i = 0; i < 63; i++) {
-   bootloader_image.bootblock_checksum +=
+   bootloader_image.bootblock_checksum +=
bootloader_image.bootblock_quadwords[i];
}
 
 /* Write the whole thing out! */
lseek(dev, 0L, SEEK_SET);
if (write(dev, _image, sizeof(bootblock)) != 
sizeof(bootblock)) {
-   perror("bootblock write");
-   exit(0);
+   perror("bootblock write");
+   exit(0);
}
 
close(fd);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/4] alpha: Converse all space errors into tabs in mkbb.c

2014-07-15 Thread Nicholas Krause
This patch fixes all the checkpatch errors I get when running it
on mkbb.c for spaces at beginning of lines. I converted then all
to tabs to fix these checkpatch warnings.
---
 arch/alpha/boot/tools/mkbb.c | 124 +--
 1 file changed, 61 insertions(+), 63 deletions(-)

diff --git a/arch/alpha/boot/tools/mkbb.c b/arch/alpha/boot/tools/mkbb.c
index 1185778..6f1b957 100644
--- a/arch/alpha/boot/tools/mkbb.c
+++ b/arch/alpha/boot/tools/mkbb.c
@@ -34,49 +34,49 @@
 #endif
 
 struct disklabel {
-u32d_magic;/* must be 
DISKLABELMAGIC */
-u16d_type, d_subtype;
-u8 d_typename[16];
-u8 d_packname[16];
-u32d_secsize;
-u32d_nsectors;
-u32d_ntracks;
-u32d_ncylinders;
-u32d_secpercyl;
-u32d_secprtunit;
-u16d_sparespertrack;
-u16d_sparespercyl;
-u32d_acylinders;
-u16d_rpm, d_interleave, d_trackskew, d_cylskew;
-u32d_headswitch, d_trkseek, d_flags;
-u32d_drivedata[5];
-u32d_spare[5];
-u32d_magic2;   /* must be 
DISKLABELMAGIC */
-u16d_checksum;
-u16d_npartitions;
-u32d_bbsize, d_sbsize;
-struct d_partition {
+   u32 d_magic;/* must be DISKLABELMAGIC */
+   u16 d_type, d_subtype;
+   u8  d_typename[16];
+   u8  d_packname[16];
+   u32 d_secsize;
+   u32 d_nsectors;
+   u32 d_ntracks;
+   u32 d_ncylinders;
+   u32 d_secpercyl;
+   u32 d_secprtunit;
+   u16 d_sparespertrack;
+   u16 d_sparespercyl;
+   u32 d_acylinders;
+   u16 d_rpm, d_interleave, d_trackskew, d_cylskew;
+   u32 d_headswitch, d_trkseek, d_flags;
+   u32 d_drivedata[5];
+   u32 d_spare[5];
+   u32 d_magic2;   /* must be 
DISKLABELMAGIC */
+   u16 d_checksum;
+   u16 d_npartitions;
+   u32 d_bbsize, d_sbsize;
+   struct d_partition {
u32 p_size;
u32 p_offset;
u32 p_fsize;
u8  p_fstype;
u8  p_frag;
u16 p_cpg;
-} d_partitions[MAXPARTITIONS];
+   } d_partitions[MAXPARTITIONS];
 };
 
 
 typedef union __bootblock {
-struct {
-char   __pad1[64];
-struct disklabel   __label;
-} __u1;
-struct {
+   struct {
+   char__pad1[64];
+   struct disklabel__label;
+   } __u1;
+   struct {
unsigned long   __pad2[63];
unsigned long   __checksum;
-} __u2;
-char   bootblock_bytes[512];
-unsigned long  bootblock_quadwords[64];
+   } __u2;
+   charbootblock_bytes[512];
+   unsigned long   bootblock_quadwords[64];
 } bootblock;
 
 #definebootblock_label __u1.__label
@@ -84,69 +84,67 @@ typedef union __bootblock {
 
 int main(int argc, char ** argv)
 {
-bootblock  bootblock_from_disk;
-bootblock  bootloader_image;
-intdev, fd;
-inti;
-intnread;
+   bootblock   bootblock_from_disk;
+   bootblock   bootloader_image;
+   int dev, fd;
+   int i;
+   int nread;
 
 /* Make sure of the arg count */
-if(argc != 3) {
+   if(argc != 3) {
fprintf(stderr, "Usage: %s device lxboot\n", argv[0]);
exit(0);
-}
+   }
 
 /* First, open the device and make sure it's accessible */
-dev = open(argv[1], O_RDWR);
-if(dev < 0) {
+   dev = open(argv[1], O_RDWR);
+   if(dev < 0) {
perror(argv[1]);
exit(0);
-}
+   }
 
 /* Now open the lxboot and make sure it's reasonable */
-fd = open(argv[2], O_RDONLY);
-if(fd < 0) {
+   fd = open(argv[2], O_RDONLY);
+   if(fd < 0) {
perror(argv[2]);
close(dev);
exit(0);
-}
+   }
 
 /* Read in the lxboot */
-nread = read(fd, _image, sizeof(bootblock));
-if(nread != sizeof(bootblock)) {
+   nread = read(fd, _image, sizeof(bootblock));
+   if(nread != sizeof(bootblock)) {
perror("lxboot read");
fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread);
exit(0);
-}
+   }
 
 /* Read in the bootblock from disk. */
-nread = read(dev, _from_disk, sizeof(bootblock));
-if(nread != sizeof(bootblock)) {
+   nread = read(dev, _from_disk, sizeof(bootblock));
+   if(nread != sizeof(bootblock)) {
perror("bootblock read");
fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread);
exit(0);
-}
+   }
 
 /* Swap the 

[PATCH 4/4] alpha: Remove checkpatch error in mkk.b

2014-07-15 Thread Nicholas Krause
This removes a error I get when I run checkpatch on this file, relating
to the asterisk for declaritations needing to be next to the name of the
variable/structure and not the type of variable/structure.
---
 arch/alpha/boot/tools/mkbb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/boot/tools/mkbb.c b/arch/alpha/boot/tools/mkbb.c
index 69f347e..dac34c2 100644
--- a/arch/alpha/boot/tools/mkbb.c
+++ b/arch/alpha/boot/tools/mkbb.c
@@ -82,7 +82,7 @@ typedef union __bootblock {
 #definebootblock_label __u1.__label
 #define bootblock_checksum __u2.__checksum
 
-int main(int argc, char ** argv)
+int main(int argc, char **argv)
 {
bootblock   bootblock_from_disk;
bootblock   bootloader_image;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 6/6 v2] alpha: Join lines and merge strings for the two lines

2014-07-15 Thread Nicholas Krause
This patch merges lines 92 and 93. In addition it merges the strings on
both lines by removing the quotes around the seperate strings. This is 
needed to remove the final checkpatch error I get from running it on 
bootpz.c

Signed-off-by: Nicholas Krause 
---
 arch/alpha/boot/bootpz.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index d6ad191..51122f7 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -89,8 +89,7 @@ check_range(unsigned long vstart, unsigned long vend,
if (kaddr >= kstart && kaddr <= kend)
{
 #ifdef DEBUG_CHECK_RANGE
-   srm_printk("OVERLAP: vaddr 0x%lx kaddr 0x%lx"
-  " [0x%lx:0x%lx]\n",
+   srm_printk("OVERLAP: vaddr 0x%lx kaddr 0x%lx 
[0x%lx:0x%lx]\n",
   vaddr, kaddr, kstart, kend);
 #endif
return 1;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/5] alpha: Fix spacing in misc.c

2014-07-15 Thread Nicholas Krause
Due to errors with checkpatch in this file I am checking certain defintions
spacing to pass checkpatch for spacing issues.
---
 arch/alpha/boot/misc.c | 23 ---
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 3f86c3e..119d500 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -23,10 +23,10 @@
 
 #include 
 
-#define memzero(s,n)   memset ((s),0,(n))
+#define memzero (s, n) memset((s), 0 , (n))
 #define puts   srm_printk
 extern long srm_printk(const char *, ...)
- __attribute__ ((format (printf, 1, 2)));
+   __attribute__ ((format (printf, 1, 2)));
 
 /*
  * gzip delarations
@@ -61,19 +61,19 @@ static unsigned outcnt; /* bytes in output 
buffer */
 
 /* Diagnostic functions */
 #ifdef DEBUG
-#  define Assert(cond,msg) {if(!(cond)) error(msg);}
+#  define Assert (cond, msg) {if (!(cond)) error(msg) ; }
 #  define Trace(x) fprintf x
-#  define Tracev(x) {if (verbose) fprintf x ;}
-#  define Tracevv(x) {if (verbose>1) fprintf x ;}
-#  define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
-#  define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
+#  define Tracev(x) {if (verbose) fprintf x ; }
+#  define Tracevv(x) {if (verbose > 1) fprintf x ; }
+#  define Tracec(c, x) {if (verbose && (c)) fprintf x ; }
+#  define Tracecv(c, x) {if (verbose > 1 && (c)) fprintf x ; }
 #else
-#  define Assert(cond,msg)
+#  define Assert(cond, msg)
 #  define Trace(x)
 #  define Tracev(x)
 #  define Tracevv(x)
-#  define Tracec(c,x)
-#  define Tracecv(c,x)
+#  define Tracec(c, x)
+#  define Tracecv(c, x)
 #endif
 
 static int  fill_inbuf(void);
@@ -144,7 +144,8 @@ static void error(char *x)
puts(x);
puts("\n\n -- System halted");
 
-   while(1);   /* Halt */
+   while (1);  
+   /* Halt */
 }
 
 unsigned int
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/5] alpha: Fix while statement

2014-07-15 Thread Nicholas Krause
This fixes the if statement on line 147 of misc.c to have parthesises
around itself removing a checkpatch error on this line.
---
 arch/alpha/boot/misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 886e469..56c3325 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -144,7 +144,7 @@ static void error(char *x)
puts(x);
puts("\n\n -- System halted");
 
-   while (1);
+   while{ (1); }
/* Halt */
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/5] alpha: Fix complex marco definitions

2014-07-15 Thread Nicholas Krause
This patch fixes all macro defintions that need parthesises as stated
by checkpatch when run against this file.
---
 arch/alpha/boot/misc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 174b7c6..886e469 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -23,7 +23,7 @@
 
 #include 
 
-#define memzero (s, n) memset((s), 0 , (n))
+#define memzero { (s, n)   memset((s), 0 , (n)) }
 #define puts   srm_printk
 extern long srm_printk(const char *, ...)
__attribute__ ((format (printf, 1, 2)));
@@ -61,8 +61,8 @@ static unsigned outcnt;   /* bytes in output 
buffer */
 
 /* Diagnostic functions */
 #ifdef DEBUG
-#  define Assert (cond, msg) {if (!(cond)) error(msg) ; }
-#  define Trace(x) fprintf x
+#  define Assert { (cond, msg) {if (!(cond)) error(msg) ; } }
+#  define Trace { (x) fprintf x }
 #  define Tracev(x) {if (verbose) fprintf x ; }
 #  define Tracevv(x) {if (verbose > 1) fprintf x ; }
 #  define Tracec(c, x) {if (verbose && (c)) fprintf x ; }
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/5] alpha: Remove whitespace errors that cleanfile missed

2014-07-15 Thread Nicholas Krause
This patch removes the whitespace error that cleanfile missed when
I ran it on this file.
---
 arch/alpha/boot/misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 119d500..174b7c6 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -144,7 +144,7 @@ static void error(char *x)
puts(x);
puts("\n\n -- System halted");
 
-   while (1);  
+   while (1);
/* Halt */
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/5] alpha: checkpatch whitespace errors in misc.c

2014-07-15 Thread Nicholas Krause
This patch runs cleanfile against this file in order to remove all
outstanding whitespace errors caught when I ran checkpatch on it.
---
 arch/alpha/boot/misc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 3ff9a95..3f86c3e 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -1,7 +1,7 @@
 /*
  * misc.c
- * 
- * This is a collection of several routines from gzip-1.0.3 
+ *
+ * This is a collection of several routines from gzip-1.0.3
  * adapted for Linux.
  *
  * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
@@ -10,7 +10,7 @@
  *
  * Nicolas Pitre   1999/04/14 :
  *  For this code to run directly from Flash, all constant variables must
- *  be marked with 'const' and all other variables initialized at run-time 
+ *  be marked with 'const' and all other variables initialized at run-time
  *  only.  This way all non constant variables will end up in the bss segment,
  *  which should point to addresses in RAM and cleared to 0 on start.
  *  This allows for a much quicker boot time.
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/6] alpha: Remove bracket errors in bootpz.c

2014-07-15 Thread Nicholas Krause
This patch removes all errors related to brackets not being placed
correctly in this file as declared when running checkpatch on it.
---
 arch/alpha/boot/bootpz.c | 18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 0b5c978..6dd34e4 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -83,11 +83,9 @@ check_range(unsigned long vstart, unsigned long vend,
   vstart, vend, kstart, kend);
 #endif
/* do some range checking for detecting an overlap... */
-   for (vaddr = vstart; vaddr <= vend; vaddr += PAGE_SIZE)
-   {
+   for (vaddr = vstart; vaddr <= vend; vaddr += PAGE_SIZE) {
kaddr = (find_pa(vaddr) | PAGE_OFFSET);
-   if (kaddr >= kstart && kaddr <= kend)
-   {
+   if (kaddr >= kstart && kaddr <= kend) {
 #ifdef DEBUG_CHECK_RANGE
srm_printk("OVERLAP: vaddr 0x%lx kaddr 0x%lx"
   " [0x%lx:0x%lx]\n",
@@ -310,9 +308,8 @@ start_kernel(void)
 
/* Get the parameter list from the console environment variable. */
nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval));
-   if (nbytes < 0 || nbytes >= sizeof(envval)) {
+   if (nbytes < 0 || nbytes >= sizeof(envval))
nbytes = 0;
-   }
envval[nbytes] = '\0';
 
 #ifdef DEBUG_ADDRESSES
@@ -346,8 +343,7 @@ start_kernel(void)
   in conflict.
 */
if (check_range(V_BOOTSTRAPPER_START, V_BOOTSTRAPPER_END,
-   K_KERNEL_DATA_START, K_KERNEL_IMAGE_END))
-   {
+   K_KERNEL_DATA_START, K_KERNEL_IMAGE_END)) {
srm_printk("FATAL ERROR: overlap of bootstrapper code\n");
__halt();
}
@@ -359,8 +355,7 @@ start_kernel(void)
   execution.
 */
if (check_range(V_DATA_START, V_DATA_END,
-   K_KERNEL_IMAGE_START, K_COPY_IMAGE_END))
-   {
+   K_KERNEL_IMAGE_START, K_COPY_IMAGE_END)) {
 #ifdef DEBUG_ADDRESSES
srm_printk("OVERLAP: cannot decompress in place\n");
 #endif
@@ -376,8 +371,7 @@ start_kernel(void)
*/
while (check_range(V_DATA_START, V_DATA_END,
   uncompressed_image_start,
-  uncompressed_image_end))
-   {
+  uncompressed_image_end)) {
 #if 0
uncompressed_image_start += K_COPY_IMAGE_SIZE;
uncompressed_image_end += K_COPY_IMAGE_SIZE;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/6] alpha: Add line below declartion on line 287

2014-07-15 Thread Nicholas Krause
This patch adds a line before the declartion of asm_sp in order
to fix a checkpatch error I get when running it on this file.
---
 arch/alpha/boot/bootpz.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 6dd34e4..6fc840d 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -285,6 +285,7 @@ start_kernel(void)
 */
static long nbytes;
static char envval[256] __attribute__((aligned(8)));
+
register unsigned long asm_sp asm("30");
 
SP_on_entry = asm_sp;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/6] alpha: Remove all errors for checkpatch foo* bar

2014-07-15 Thread Nicholas Krause
This patch changes all issues with checkpatch relating to the asterisk
not being put next to the variable or structrue name and rather the
type of the declaring statement.
---
 arch/alpha/boot/bootpz.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 15c16fe..0b5c978 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -42,10 +42,10 @@
 #undef DEBUG_LAST_STEPS
 
 extern unsigned long switch_to_osf_pal(unsigned long nr,
-   struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa,
+   struct pcb_struct *pcb_va, struct pcb_struct *pcb_pa,
unsigned long *vptb);
 
-extern int decompress_kernel(void* destination, void *source,
+extern int decompress_kernel(void *destination, void *source,
 size_t ksize, size_t kzsize);
 
 extern void move_stack(unsigned long new_stack);
@@ -116,8 +116,8 @@ void
 pal_init(void)
 {
unsigned long i, rev;
-   struct percpu_struct * percpu;
-   struct pcb_struct * pcb_pa;
+   struct percpu_struct *percpu;
+   struct pcb_struct *pcb_pa;
 
/* Create the dummy PCB.  */
pcb_va->ksp = 0;
@@ -448,8 +448,8 @@ start_kernel(void)
 #ifdef DEBUG_LAST_STEPS
srm_printk("Preparing ZERO_PGE...\n");
 #endif
-   memset((char*)ZERO_PGE, 0, PAGE_SIZE);
-   strcpy((char*)ZERO_PGE, envval);
+   memset((char *)ZERO_PGE, 0, PAGE_SIZE);
+   strcpy((char *)ZERO_PGE, envval);
 
 #ifdef INITRD_IMAGE_SIZE
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 6/6] alpha: Join lines 90 and 91

2014-07-15 Thread Nicholas Krause
This fixes the checkpatch error I get in this file relating to a
quoted string needed to be joined to the line above it.
---
 arch/alpha/boot/bootpz.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 6fc840d..a9e127b 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -87,8 +87,7 @@ check_range(unsigned long vstart, unsigned long vend,
kaddr = (find_pa(vaddr) | PAGE_OFFSET);
if (kaddr >= kstart && kaddr <= kend) {
 #ifdef DEBUG_CHECK_RANGE
-   srm_printk("OVERLAP: vaddr 0x%lx kaddr 0x%lx"
-  " [0x%lx:0x%lx]\n",
+   srm_printk("OVERLAP: vaddr 0x%lx kaddr 0x%lx" " 
[0x%lx:0x%lx]\n",
   vaddr, kaddr, kstart, kend);
 #endif
return 1;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/6] alpha: Fix spaces to tabs

2014-07-15 Thread Nicholas Krause
This patch fixes all errors for this file related to using spaces
instead of tabs.
---
 arch/alpha/boot/bootpz.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 64a0da6..15c16fe 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -252,11 +252,11 @@ extern char _end;
 #define K_COPY_IMAGE_START NEXT_PAGE(K_KERNEL_IMAGE_END)
 /* Reserve one page below INITRD for the new stack. */
 #define K_INITRD_START \
-NEXT_PAGE(K_COPY_IMAGE_START + KERNEL_SIZE + PAGE_SIZE)
+   NEXT_PAGE(K_COPY_IMAGE_START + KERNEL_SIZE + PAGE_SIZE)
 #define K_COPY_IMAGE_END \
-(K_INITRD_START + REAL_INITRD_SIZE + MALLOC_AREA_SIZE)
+   (K_INITRD_START + REAL_INITRD_SIZE + MALLOC_AREA_SIZE)
 #define K_COPY_IMAGE_SIZE \
-NEXT_PAGE(K_COPY_IMAGE_END - K_COPY_IMAGE_START)
+   NEXT_PAGE(K_COPY_IMAGE_END - K_COPY_IMAGE_START)
 
 void
 start_kernel(void)
@@ -400,7 +400,7 @@ start_kernel(void)
   uncompressed_image_start,
   KERNEL_SIZE);
 #endif
-decompress_kernel((void *)uncompressed_image_start,
+   decompress_kernel((void *)uncompressed_image_start,
  (void *)V_DATA_START,
  KERNEL_SIZE, KERNEL_Z_SIZE);
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/6] alpha: Remove whiterrors related to uneeded characters and lines

2014-07-15 Thread Nicholas Krause
This file has multipe cleanpatch errors. This patch is the first in
a series to clean them up. This one removes uneeded characters and
lines from this file.
---
 arch/alpha/boot/bootpz.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index d6ad191..64a0da6 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -70,7 +70,7 @@ find_pa(unsigned long address)
result <<= 13;
result |= address & 0x1fff;
return result;
-}  
+}
 
 int
 check_range(unsigned long vstart, unsigned long vend,
@@ -199,14 +199,14 @@ extern char _end;
 
START_ADDR  KSEG address of the entry point of kernel code.
 
-   ZERO_PGEKSEG address of page full of zeroes, but 
+   ZERO_PGEKSEG address of page full of zeroes, but
upon entry to kerne cvan be expected
to hold the parameter list and possible
INTRD information.
 
These are used in the local defines below.
 */
-  
+
 
 /* Virtual addresses for the BOOTP image. Note that this includes the
bootstrapper code as well as the compressed kernel image, and
@@ -229,7 +229,7 @@ extern char _end;
 #define V_DATA_START   KERNEL_ORIGIN
 #define V_INITRD_START (KERNEL_ORIGIN + KERNEL_Z_SIZE)
 #define V_INTRD_END(V_INITRD_START + REAL_INITRD_SIZE)
-#define V_DATA_END V_BOOT_IMAGE_END
+#define V_DATA_END V_BOOT_IMAGE_END
 
 /* KSEG addresses for the uncompressed kernel.
 
@@ -296,7 +296,7 @@ start_kernel(void)
/* Validity check the HWRPB. */
if (INIT_HWRPB->pagesize != 8192) {
srm_printk("Expected 8kB pages, got %ldkB\n",
-  INIT_HWRPB->pagesize >> 10);
+   INIT_HWRPB->pagesize >> 10);
return;
}
if (INIT_HWRPB->vptb != (unsigned long) VPTB) {
@@ -443,7 +443,7 @@ start_kernel(void)
memcpy((void *)K_KERNEL_IMAGE_START,
   (void *)uncompressed_image_start, KERNEL_SIZE);
}
-   
+
/* Clear the zero page, then move the argument list in. */
 #ifdef DEBUG_LAST_STEPS
srm_printk("Preparing ZERO_PGE...\n");
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/6] alpha: Remove whiterrors related to uneeded characters and lines

2014-07-15 Thread Nicholas Krause
This file has multipe cleanpatch errors. This patch is the first in
a series to clean them up. This one removes uneeded characters and
lines from this file.
---
 arch/alpha/boot/bootpz.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index d6ad191..64a0da6 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -70,7 +70,7 @@ find_pa(unsigned long address)
result = 13;
result |= address  0x1fff;
return result;
-}  
+}
 
 int
 check_range(unsigned long vstart, unsigned long vend,
@@ -199,14 +199,14 @@ extern char _end;
 
START_ADDR  KSEG address of the entry point of kernel code.
 
-   ZERO_PGEKSEG address of page full of zeroes, but 
+   ZERO_PGEKSEG address of page full of zeroes, but
upon entry to kerne cvan be expected
to hold the parameter list and possible
INTRD information.
 
These are used in the local defines below.
 */
-  
+
 
 /* Virtual addresses for the BOOTP image. Note that this includes the
bootstrapper code as well as the compressed kernel image, and
@@ -229,7 +229,7 @@ extern char _end;
 #define V_DATA_START   KERNEL_ORIGIN
 #define V_INITRD_START (KERNEL_ORIGIN + KERNEL_Z_SIZE)
 #define V_INTRD_END(V_INITRD_START + REAL_INITRD_SIZE)
-#define V_DATA_END V_BOOT_IMAGE_END
+#define V_DATA_END V_BOOT_IMAGE_END
 
 /* KSEG addresses for the uncompressed kernel.
 
@@ -296,7 +296,7 @@ start_kernel(void)
/* Validity check the HWRPB. */
if (INIT_HWRPB-pagesize != 8192) {
srm_printk(Expected 8kB pages, got %ldkB\n,
-  INIT_HWRPB-pagesize  10);
+   INIT_HWRPB-pagesize  10);
return;
}
if (INIT_HWRPB-vptb != (unsigned long) VPTB) {
@@ -443,7 +443,7 @@ start_kernel(void)
memcpy((void *)K_KERNEL_IMAGE_START,
   (void *)uncompressed_image_start, KERNEL_SIZE);
}
-   
+
/* Clear the zero page, then move the argument list in. */
 #ifdef DEBUG_LAST_STEPS
srm_printk(Preparing ZERO_PGE...\n);
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/6] alpha: Fix spaces to tabs

2014-07-15 Thread Nicholas Krause
This patch fixes all errors for this file related to using spaces
instead of tabs.
---
 arch/alpha/boot/bootpz.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 64a0da6..15c16fe 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -252,11 +252,11 @@ extern char _end;
 #define K_COPY_IMAGE_START NEXT_PAGE(K_KERNEL_IMAGE_END)
 /* Reserve one page below INITRD for the new stack. */
 #define K_INITRD_START \
-NEXT_PAGE(K_COPY_IMAGE_START + KERNEL_SIZE + PAGE_SIZE)
+   NEXT_PAGE(K_COPY_IMAGE_START + KERNEL_SIZE + PAGE_SIZE)
 #define K_COPY_IMAGE_END \
-(K_INITRD_START + REAL_INITRD_SIZE + MALLOC_AREA_SIZE)
+   (K_INITRD_START + REAL_INITRD_SIZE + MALLOC_AREA_SIZE)
 #define K_COPY_IMAGE_SIZE \
-NEXT_PAGE(K_COPY_IMAGE_END - K_COPY_IMAGE_START)
+   NEXT_PAGE(K_COPY_IMAGE_END - K_COPY_IMAGE_START)
 
 void
 start_kernel(void)
@@ -400,7 +400,7 @@ start_kernel(void)
   uncompressed_image_start,
   KERNEL_SIZE);
 #endif
-decompress_kernel((void *)uncompressed_image_start,
+   decompress_kernel((void *)uncompressed_image_start,
  (void *)V_DATA_START,
  KERNEL_SIZE, KERNEL_Z_SIZE);
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 6/6] alpha: Join lines 90 and 91

2014-07-15 Thread Nicholas Krause
This fixes the checkpatch error I get in this file relating to a
quoted string needed to be joined to the line above it.
---
 arch/alpha/boot/bootpz.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 6fc840d..a9e127b 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -87,8 +87,7 @@ check_range(unsigned long vstart, unsigned long vend,
kaddr = (find_pa(vaddr) | PAGE_OFFSET);
if (kaddr = kstart  kaddr = kend) {
 #ifdef DEBUG_CHECK_RANGE
-   srm_printk(OVERLAP: vaddr 0x%lx kaddr 0x%lx
-   [0x%lx:0x%lx]\n,
+   srm_printk(OVERLAP: vaddr 0x%lx kaddr 0x%lx  
[0x%lx:0x%lx]\n,
   vaddr, kaddr, kstart, kend);
 #endif
return 1;
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/6] alpha: Remove all errors for checkpatch foo* bar

2014-07-15 Thread Nicholas Krause
This patch changes all issues with checkpatch relating to the asterisk
not being put next to the variable or structrue name and rather the
type of the declaring statement.
---
 arch/alpha/boot/bootpz.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 15c16fe..0b5c978 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -42,10 +42,10 @@
 #undef DEBUG_LAST_STEPS
 
 extern unsigned long switch_to_osf_pal(unsigned long nr,
-   struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa,
+   struct pcb_struct *pcb_va, struct pcb_struct *pcb_pa,
unsigned long *vptb);
 
-extern int decompress_kernel(void* destination, void *source,
+extern int decompress_kernel(void *destination, void *source,
 size_t ksize, size_t kzsize);
 
 extern void move_stack(unsigned long new_stack);
@@ -116,8 +116,8 @@ void
 pal_init(void)
 {
unsigned long i, rev;
-   struct percpu_struct * percpu;
-   struct pcb_struct * pcb_pa;
+   struct percpu_struct *percpu;
+   struct pcb_struct *pcb_pa;
 
/* Create the dummy PCB.  */
pcb_va-ksp = 0;
@@ -448,8 +448,8 @@ start_kernel(void)
 #ifdef DEBUG_LAST_STEPS
srm_printk(Preparing ZERO_PGE...\n);
 #endif
-   memset((char*)ZERO_PGE, 0, PAGE_SIZE);
-   strcpy((char*)ZERO_PGE, envval);
+   memset((char *)ZERO_PGE, 0, PAGE_SIZE);
+   strcpy((char *)ZERO_PGE, envval);
 
 #ifdef INITRD_IMAGE_SIZE
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/6] alpha: Remove bracket errors in bootpz.c

2014-07-15 Thread Nicholas Krause
This patch removes all errors related to brackets not being placed
correctly in this file as declared when running checkpatch on it.
---
 arch/alpha/boot/bootpz.c | 18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 0b5c978..6dd34e4 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -83,11 +83,9 @@ check_range(unsigned long vstart, unsigned long vend,
   vstart, vend, kstart, kend);
 #endif
/* do some range checking for detecting an overlap... */
-   for (vaddr = vstart; vaddr = vend; vaddr += PAGE_SIZE)
-   {
+   for (vaddr = vstart; vaddr = vend; vaddr += PAGE_SIZE) {
kaddr = (find_pa(vaddr) | PAGE_OFFSET);
-   if (kaddr = kstart  kaddr = kend)
-   {
+   if (kaddr = kstart  kaddr = kend) {
 #ifdef DEBUG_CHECK_RANGE
srm_printk(OVERLAP: vaddr 0x%lx kaddr 0x%lx
[0x%lx:0x%lx]\n,
@@ -310,9 +308,8 @@ start_kernel(void)
 
/* Get the parameter list from the console environment variable. */
nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval));
-   if (nbytes  0 || nbytes = sizeof(envval)) {
+   if (nbytes  0 || nbytes = sizeof(envval))
nbytes = 0;
-   }
envval[nbytes] = '\0';
 
 #ifdef DEBUG_ADDRESSES
@@ -346,8 +343,7 @@ start_kernel(void)
   in conflict.
 */
if (check_range(V_BOOTSTRAPPER_START, V_BOOTSTRAPPER_END,
-   K_KERNEL_DATA_START, K_KERNEL_IMAGE_END))
-   {
+   K_KERNEL_DATA_START, K_KERNEL_IMAGE_END)) {
srm_printk(FATAL ERROR: overlap of bootstrapper code\n);
__halt();
}
@@ -359,8 +355,7 @@ start_kernel(void)
   execution.
 */
if (check_range(V_DATA_START, V_DATA_END,
-   K_KERNEL_IMAGE_START, K_COPY_IMAGE_END))
-   {
+   K_KERNEL_IMAGE_START, K_COPY_IMAGE_END)) {
 #ifdef DEBUG_ADDRESSES
srm_printk(OVERLAP: cannot decompress in place\n);
 #endif
@@ -376,8 +371,7 @@ start_kernel(void)
*/
while (check_range(V_DATA_START, V_DATA_END,
   uncompressed_image_start,
-  uncompressed_image_end))
-   {
+  uncompressed_image_end)) {
 #if 0
uncompressed_image_start += K_COPY_IMAGE_SIZE;
uncompressed_image_end += K_COPY_IMAGE_SIZE;
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/6] alpha: Add line below declartion on line 287

2014-07-15 Thread Nicholas Krause
This patch adds a line before the declartion of asm_sp in order
to fix a checkpatch error I get when running it on this file.
---
 arch/alpha/boot/bootpz.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 6dd34e4..6fc840d 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -285,6 +285,7 @@ start_kernel(void)
 */
static long nbytes;
static char envval[256] __attribute__((aligned(8)));
+
register unsigned long asm_sp asm(30);
 
SP_on_entry = asm_sp;
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/5] alpha: checkpatch whitespace errors in misc.c

2014-07-15 Thread Nicholas Krause
This patch runs cleanfile against this file in order to remove all
outstanding whitespace errors caught when I ran checkpatch on it.
---
 arch/alpha/boot/misc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 3ff9a95..3f86c3e 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -1,7 +1,7 @@
 /*
  * misc.c
- * 
- * This is a collection of several routines from gzip-1.0.3 
+ *
+ * This is a collection of several routines from gzip-1.0.3
  * adapted for Linux.
  *
  * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
@@ -10,7 +10,7 @@
  *
  * Nicolas Pitre n...@visuaide.com  1999/04/14 :
  *  For this code to run directly from Flash, all constant variables must
- *  be marked with 'const' and all other variables initialized at run-time 
+ *  be marked with 'const' and all other variables initialized at run-time
  *  only.  This way all non constant variables will end up in the bss segment,
  *  which should point to addresses in RAM and cleared to 0 on start.
  *  This allows for a much quicker boot time.
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/5] alpha: Fix while statement

2014-07-15 Thread Nicholas Krause
This fixes the if statement on line 147 of misc.c to have parthesises
around itself removing a checkpatch error on this line.
---
 arch/alpha/boot/misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 886e469..56c3325 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -144,7 +144,7 @@ static void error(char *x)
puts(x);
puts(\n\n -- System halted);
 
-   while (1);
+   while{ (1); }
/* Halt */
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/5] alpha: Fix complex marco definitions

2014-07-15 Thread Nicholas Krause
This patch fixes all macro defintions that need parthesises as stated
by checkpatch when run against this file.
---
 arch/alpha/boot/misc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 174b7c6..886e469 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -23,7 +23,7 @@
 
 #include asm/uaccess.h
 
-#define memzero (s, n) memset((s), 0 , (n))
+#define memzero { (s, n)   memset((s), 0 , (n)) }
 #define puts   srm_printk
 extern long srm_printk(const char *, ...)
__attribute__ ((format (printf, 1, 2)));
@@ -61,8 +61,8 @@ static unsigned outcnt;   /* bytes in output 
buffer */
 
 /* Diagnostic functions */
 #ifdef DEBUG
-#  define Assert (cond, msg) {if (!(cond)) error(msg) ; }
-#  define Trace(x) fprintf x
+#  define Assert { (cond, msg) {if (!(cond)) error(msg) ; } }
+#  define Trace { (x) fprintf x }
 #  define Tracev(x) {if (verbose) fprintf x ; }
 #  define Tracevv(x) {if (verbose  1) fprintf x ; }
 #  define Tracec(c, x) {if (verbose  (c)) fprintf x ; }
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/5] alpha: Remove whitespace errors that cleanfile missed

2014-07-15 Thread Nicholas Krause
This patch removes the whitespace error that cleanfile missed when
I ran it on this file.
---
 arch/alpha/boot/misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 119d500..174b7c6 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -144,7 +144,7 @@ static void error(char *x)
puts(x);
puts(\n\n -- System halted);
 
-   while (1);  
+   while (1);
/* Halt */
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/5] alpha: Fix spacing in misc.c

2014-07-15 Thread Nicholas Krause
Due to errors with checkpatch in this file I am checking certain defintions
spacing to pass checkpatch for spacing issues.
---
 arch/alpha/boot/misc.c | 23 ---
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c
index 3f86c3e..119d500 100644
--- a/arch/alpha/boot/misc.c
+++ b/arch/alpha/boot/misc.c
@@ -23,10 +23,10 @@
 
 #include asm/uaccess.h
 
-#define memzero(s,n)   memset ((s),0,(n))
+#define memzero (s, n) memset((s), 0 , (n))
 #define puts   srm_printk
 extern long srm_printk(const char *, ...)
- __attribute__ ((format (printf, 1, 2)));
+   __attribute__ ((format (printf, 1, 2)));
 
 /*
  * gzip delarations
@@ -61,19 +61,19 @@ static unsigned outcnt; /* bytes in output 
buffer */
 
 /* Diagnostic functions */
 #ifdef DEBUG
-#  define Assert(cond,msg) {if(!(cond)) error(msg);}
+#  define Assert (cond, msg) {if (!(cond)) error(msg) ; }
 #  define Trace(x) fprintf x
-#  define Tracev(x) {if (verbose) fprintf x ;}
-#  define Tracevv(x) {if (verbose1) fprintf x ;}
-#  define Tracec(c,x) {if (verbose  (c)) fprintf x ;}
-#  define Tracecv(c,x) {if (verbose1  (c)) fprintf x ;}
+#  define Tracev(x) {if (verbose) fprintf x ; }
+#  define Tracevv(x) {if (verbose  1) fprintf x ; }
+#  define Tracec(c, x) {if (verbose  (c)) fprintf x ; }
+#  define Tracecv(c, x) {if (verbose  1  (c)) fprintf x ; }
 #else
-#  define Assert(cond,msg)
+#  define Assert(cond, msg)
 #  define Trace(x)
 #  define Tracev(x)
 #  define Tracevv(x)
-#  define Tracec(c,x)
-#  define Tracecv(c,x)
+#  define Tracec(c, x)
+#  define Tracecv(c, x)
 #endif
 
 static int  fill_inbuf(void);
@@ -144,7 +144,8 @@ static void error(char *x)
puts(x);
puts(\n\n -- System halted);
 
-   while(1);   /* Halt */
+   while (1);  
+   /* Halt */
 }
 
 unsigned int
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 6/6 v2] alpha: Join lines and merge strings for the two lines

2014-07-15 Thread Nicholas Krause
This patch merges lines 92 and 93. In addition it merges the strings on
both lines by removing the quotes around the seperate strings. This is 
needed to remove the final checkpatch error I get from running it on 
bootpz.c

Signed-off-by: Nicholas Krause xerofo...@gmail.com
---
 arch/alpha/boot/bootpz.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index d6ad191..51122f7 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -89,8 +89,7 @@ check_range(unsigned long vstart, unsigned long vend,
if (kaddr = kstart  kaddr = kend)
{
 #ifdef DEBUG_CHECK_RANGE
-   srm_printk(OVERLAP: vaddr 0x%lx kaddr 0x%lx
-   [0x%lx:0x%lx]\n,
+   srm_printk(OVERLAP: vaddr 0x%lx kaddr 0x%lx 
[0x%lx:0x%lx]\n,
   vaddr, kaddr, kstart, kend);
 #endif
return 1;
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/4] alpha: Remove checkpatch error in mkk.b

2014-07-15 Thread Nicholas Krause
This removes a error I get when I run checkpatch on this file, relating
to the asterisk for declaritations needing to be next to the name of the
variable/structure and not the type of variable/structure.
---
 arch/alpha/boot/tools/mkbb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/boot/tools/mkbb.c b/arch/alpha/boot/tools/mkbb.c
index 69f347e..dac34c2 100644
--- a/arch/alpha/boot/tools/mkbb.c
+++ b/arch/alpha/boot/tools/mkbb.c
@@ -82,7 +82,7 @@ typedef union __bootblock {
 #definebootblock_label __u1.__label
 #define bootblock_checksum __u2.__checksum
 
-int main(int argc, char ** argv)
+int main(int argc, char **argv)
 {
bootblock   bootblock_from_disk;
bootblock   bootloader_image;
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/4] alpha: Indent if Statements properly

2014-07-15 Thread Nicholas Krause
This patch removes the errors this file gets with checkpatch due
to errors relating to if statements and their enclosing statements
not being indented properly.
---
 arch/alpha/boot/tools/mkbb.c | 34 +-
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/arch/alpha/boot/tools/mkbb.c b/arch/alpha/boot/tools/mkbb.c
index 214b6c7..69f347e 100644
--- a/arch/alpha/boot/tools/mkbb.c
+++ b/arch/alpha/boot/tools/mkbb.c
@@ -92,39 +92,39 @@ int main(int argc, char ** argv)
 
 /* Make sure of the arg count */
if (argc != 3) {
-   fprintf(stderr, Usage: %s device lxboot\n, argv[0]);
-   exit(0);
+   fprintf(stderr, Usage: %s device lxboot\n, argv[0]);
+   exit(0);
}
 
 /* First, open the device and make sure it's accessible */
dev = open(argv[1], O_RDWR);
-   if (dev  0) {
-   perror(argv[1]);
-   exit(0);
+   if (dev  0) {
+   perror(argv[1]);
+   exit(0);
}
 
 /* Now open the lxboot and make sure it's reasonable */
fd = open(argv[2], O_RDONLY);
if (fd  0) {
-   perror(argv[2]);
-   close(dev);
-   exit(0);
+   perror(argv[2]);
+   close(dev);
+   exit(0);
}
 
 /* Read in the lxboot */
nread = read(fd, bootloader_image, sizeof(bootblock));
if (nread != sizeof(bootblock)) {
-   perror(lxboot read);
-   fprintf(stderr, expected %zd, got %d\n, sizeof(bootblock), nread);
-   exit(0);
+   perror(lxboot read);
+   fprintf(stderr, expected %zd, got %d\n, sizeof(bootblock), 
nread);
+   exit(0);
}
 
 /* Read in the bootblock from disk. */
nread = read(dev, bootblock_from_disk, sizeof(bootblock));
if (nread != sizeof(bootblock)) {
-   perror(bootblock read);
-   fprintf(stderr, expected %zd, got %d\n, sizeof(bootblock), nread);
-   exit(0);
+   perror(bootblock read);
+   fprintf(stderr, expected %zd, got %d\n, sizeof(bootblock), 
nread);
+   exit(0);
}
 
 /* Swap the bootblock's disklabel into the bootloader */
@@ -133,15 +133,15 @@ int main(int argc, char ** argv)
 /* Calculate the bootblock checksum */
bootloader_image.bootblock_checksum = 0;
for (i = 0; i  63; i++) {
-   bootloader_image.bootblock_checksum +=
+   bootloader_image.bootblock_checksum +=
bootloader_image.bootblock_quadwords[i];
}
 
 /* Write the whole thing out! */
lseek(dev, 0L, SEEK_SET);
if (write(dev, bootloader_image, sizeof(bootblock)) != 
sizeof(bootblock)) {
-   perror(bootblock write);
-   exit(0);
+   perror(bootblock write);
+   exit(0);
}
 
close(fd);
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/4] alpha: Converse all space errors into tabs in mkbb.c

2014-07-15 Thread Nicholas Krause
This patch fixes all the checkpatch errors I get when running it
on mkbb.c for spaces at beginning of lines. I converted then all
to tabs to fix these checkpatch warnings.
---
 arch/alpha/boot/tools/mkbb.c | 124 +--
 1 file changed, 61 insertions(+), 63 deletions(-)

diff --git a/arch/alpha/boot/tools/mkbb.c b/arch/alpha/boot/tools/mkbb.c
index 1185778..6f1b957 100644
--- a/arch/alpha/boot/tools/mkbb.c
+++ b/arch/alpha/boot/tools/mkbb.c
@@ -34,49 +34,49 @@
 #endif
 
 struct disklabel {
-u32d_magic;/* must be 
DISKLABELMAGIC */
-u16d_type, d_subtype;
-u8 d_typename[16];
-u8 d_packname[16];
-u32d_secsize;
-u32d_nsectors;
-u32d_ntracks;
-u32d_ncylinders;
-u32d_secpercyl;
-u32d_secprtunit;
-u16d_sparespertrack;
-u16d_sparespercyl;
-u32d_acylinders;
-u16d_rpm, d_interleave, d_trackskew, d_cylskew;
-u32d_headswitch, d_trkseek, d_flags;
-u32d_drivedata[5];
-u32d_spare[5];
-u32d_magic2;   /* must be 
DISKLABELMAGIC */
-u16d_checksum;
-u16d_npartitions;
-u32d_bbsize, d_sbsize;
-struct d_partition {
+   u32 d_magic;/* must be DISKLABELMAGIC */
+   u16 d_type, d_subtype;
+   u8  d_typename[16];
+   u8  d_packname[16];
+   u32 d_secsize;
+   u32 d_nsectors;
+   u32 d_ntracks;
+   u32 d_ncylinders;
+   u32 d_secpercyl;
+   u32 d_secprtunit;
+   u16 d_sparespertrack;
+   u16 d_sparespercyl;
+   u32 d_acylinders;
+   u16 d_rpm, d_interleave, d_trackskew, d_cylskew;
+   u32 d_headswitch, d_trkseek, d_flags;
+   u32 d_drivedata[5];
+   u32 d_spare[5];
+   u32 d_magic2;   /* must be 
DISKLABELMAGIC */
+   u16 d_checksum;
+   u16 d_npartitions;
+   u32 d_bbsize, d_sbsize;
+   struct d_partition {
u32 p_size;
u32 p_offset;
u32 p_fsize;
u8  p_fstype;
u8  p_frag;
u16 p_cpg;
-} d_partitions[MAXPARTITIONS];
+   } d_partitions[MAXPARTITIONS];
 };
 
 
 typedef union __bootblock {
-struct {
-char   __pad1[64];
-struct disklabel   __label;
-} __u1;
-struct {
+   struct {
+   char__pad1[64];
+   struct disklabel__label;
+   } __u1;
+   struct {
unsigned long   __pad2[63];
unsigned long   __checksum;
-} __u2;
-char   bootblock_bytes[512];
-unsigned long  bootblock_quadwords[64];
+   } __u2;
+   charbootblock_bytes[512];
+   unsigned long   bootblock_quadwords[64];
 } bootblock;
 
 #definebootblock_label __u1.__label
@@ -84,69 +84,67 @@ typedef union __bootblock {
 
 int main(int argc, char ** argv)
 {
-bootblock  bootblock_from_disk;
-bootblock  bootloader_image;
-intdev, fd;
-inti;
-intnread;
+   bootblock   bootblock_from_disk;
+   bootblock   bootloader_image;
+   int dev, fd;
+   int i;
+   int nread;
 
 /* Make sure of the arg count */
-if(argc != 3) {
+   if(argc != 3) {
fprintf(stderr, Usage: %s device lxboot\n, argv[0]);
exit(0);
-}
+   }
 
 /* First, open the device and make sure it's accessible */
-dev = open(argv[1], O_RDWR);
-if(dev  0) {
+   dev = open(argv[1], O_RDWR);
+   if(dev  0) {
perror(argv[1]);
exit(0);
-}
+   }
 
 /* Now open the lxboot and make sure it's reasonable */
-fd = open(argv[2], O_RDONLY);
-if(fd  0) {
+   fd = open(argv[2], O_RDONLY);
+   if(fd  0) {
perror(argv[2]);
close(dev);
exit(0);
-}
+   }
 
 /* Read in the lxboot */
-nread = read(fd, bootloader_image, sizeof(bootblock));
-if(nread != sizeof(bootblock)) {
+   nread = read(fd, bootloader_image, sizeof(bootblock));
+   if(nread != sizeof(bootblock)) {
perror(lxboot read);
fprintf(stderr, expected %zd, got %d\n, sizeof(bootblock), nread);
exit(0);
-}
+   }
 
 /* Read in the bootblock from disk. */
-nread = read(dev, bootblock_from_disk, sizeof(bootblock));
-if(nread != sizeof(bootblock)) {
+   nread = read(dev, bootblock_from_disk, sizeof(bootblock));
+   if(nread != sizeof(bootblock)) {
perror(bootblock read);
fprintf(stderr, expected %zd, got %d\n, sizeof(bootblock), nread);
exit(0);
-}
+   }
 

[PATCH 2/4] alpha: checkpatch errors in mkbb for if statements

2014-07-15 Thread Nicholas Krause
This patch fixes all errors related to no space between if and parthesises
to remove this errors when running checkpatch against this file.
---
 arch/alpha/boot/tools/mkbb.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/alpha/boot/tools/mkbb.c b/arch/alpha/boot/tools/mkbb.c
index 6f1b957..214b6c7 100644
--- a/arch/alpha/boot/tools/mkbb.c
+++ b/arch/alpha/boot/tools/mkbb.c
@@ -91,21 +91,21 @@ int main(int argc, char ** argv)
int nread;
 
 /* Make sure of the arg count */
-   if(argc != 3) {
+   if (argc != 3) {
fprintf(stderr, Usage: %s device lxboot\n, argv[0]);
exit(0);
}
 
 /* First, open the device and make sure it's accessible */
dev = open(argv[1], O_RDWR);
-   if(dev  0) {
+   if (dev  0) {
perror(argv[1]);
exit(0);
}
 
 /* Now open the lxboot and make sure it's reasonable */
fd = open(argv[2], O_RDONLY);
-   if(fd  0) {
+   if (fd  0) {
perror(argv[2]);
close(dev);
exit(0);
@@ -113,7 +113,7 @@ int main(int argc, char ** argv)
 
 /* Read in the lxboot */
nread = read(fd, bootloader_image, sizeof(bootblock));
-   if(nread != sizeof(bootblock)) {
+   if (nread != sizeof(bootblock)) {
perror(lxboot read);
fprintf(stderr, expected %zd, got %d\n, sizeof(bootblock), nread);
exit(0);
@@ -121,7 +121,7 @@ int main(int argc, char ** argv)
 
 /* Read in the bootblock from disk. */
nread = read(dev, bootblock_from_disk, sizeof(bootblock));
-   if(nread != sizeof(bootblock)) {
+   if (nread != sizeof(bootblock)) {
perror(bootblock read);
fprintf(stderr, expected %zd, got %d\n, sizeof(bootblock), nread);
exit(0);
@@ -132,14 +132,14 @@ int main(int argc, char ** argv)
 
 /* Calculate the bootblock checksum */
bootloader_image.bootblock_checksum = 0;
-   for(i = 0; i  63; i++) {
+   for (i = 0; i  63; i++) {
bootloader_image.bootblock_checksum +=
bootloader_image.bootblock_quadwords[i];
}
 
 /* Write the whole thing out! */
lseek(dev, 0L, SEEK_SET);
-   if(write(dev, bootloader_image, sizeof(bootblock)) != 
sizeof(bootblock)) {
+   if (write(dev, bootloader_image, sizeof(bootblock)) != 
sizeof(bootblock)) {
perror(bootblock write);
exit(0);
}
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/5] alpha: Checkpatch warnings on lines 71 and 72

2014-07-14 Thread Nicholas Krause
In bootp.c I am hitting lots of warnings this fixes two on lines 71,72
in order to pass checkpatch and follow kernel coding style.
---
 arch/alpha/boot/bootp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c
index 8eb821e..3ee529d 100644
--- a/arch/alpha/boot/bootp.c
+++ b/arch/alpha/boot/bootp.c
@@ -68,8 +68,8 @@ void
 pal_init(void)
 {
unsigned long i, rev;
-   struct percpu_struct * percpu;
-   struct pcb_struct * pcb_pa;
+   struct percpu_struct *percpu;
+   struct pcb_struct *pcb_pa;
 
/* Create the dummy PCB.  */
pcb_va->ksp = 0;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/5] alpha: Remove whitespace issues and turn spaces into tabs

2014-07-14 Thread Nicholas Krause
This patch removes all the whitespace an tab issues that this file
has when running checkpatch
---
 arch/alpha/boot/bootp.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c
index 3ee529d..6227e4f 100644
--- a/arch/alpha/boot/bootp.c
+++ b/arch/alpha/boot/bootp.c
@@ -48,7 +48,7 @@ find_pa(unsigned long *vptb, void *ptr)
result <<= 13;
result |= address & 0x1fff;
return (void *) result;
-}  
+}
 
 /*
  * This function moves into OSF/1 pal-code, and has a temporary
@@ -152,7 +152,7 @@ start_kernel(void)
srm_printk("Linux/AXP bootp loader for Linux " UTS_RELEASE "\n");
if (INIT_HWRPB->pagesize != 8192) {
srm_printk("Expected 8kB pages, got %ldkB\n",
-  INIT_HWRPB->pagesize >> 10);
+   INIT_HWRPB->pagesize >> 10);
return;
}
if (INIT_HWRPB->vptb != (unsigned long) VPTB) {
@@ -162,7 +162,7 @@ start_kernel(void)
}
pal_init();
 
-   /* The initrd must be page-aligned.  See below for the 
+   /* The initrd must be page-aligned.  See below for the
   cause of the magic number 5.  */
initrd_start = ((START_ADDR + 5*KERNEL_SIZE + PAGE_SIZE) |
(PAGE_SIZE-1)) + 1;
@@ -200,8 +200,8 @@ start_kernel(void)
 #ifdef INITRD_IMAGE_SIZE
load(initrd_start, KERNEL_ORIGIN+KERNEL_SIZE, INITRD_IMAGE_SIZE);
 #endif
-load(START_ADDR+(4*KERNEL_SIZE), KERNEL_ORIGIN, KERNEL_SIZE);
-load(START_ADDR, START_ADDR+(4*KERNEL_SIZE), KERNEL_SIZE);
+   load(START_ADDR+(4*KERNEL_SIZE), KERNEL_ORIGIN, KERNEL_SIZE);
+   load(START_ADDR, START_ADDR+(4*KERNEL_SIZE), KERNEL_SIZE);
 
memset((char*)ZERO_PGE, 0, PAGE_SIZE);
strcpy((char*)ZERO_PGE, envval);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


  1   2   3   >