Commit 7636941e authored by Laura Garcia Liebana's avatar Laura Garcia Liebana Committed by Greg Kroah-Hartman
Browse files

staging: octeon: Move logical operators on the correct line



Logical continuations should be on the previous line. Checkpatch detected this issue.

Signed-off-by: default avatarLaura Garcia Liebana <nevola@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6fe5efa1
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -618,8 +618,8 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
		work->word2.s.dec_ipcomp = 0;	/* FIXME */
		work->word2.s.dec_ipcomp = 0;	/* FIXME */
#endif
#endif
		work->word2.s.tcp_or_udp =
		work->word2.s.tcp_or_udp =
		    (ip_hdr(skb)->protocol == IPPROTO_TCP)
		    (ip_hdr(skb)->protocol == IPPROTO_TCP) ||
		    || (ip_hdr(skb)->protocol == IPPROTO_UDP);
		    (ip_hdr(skb)->protocol == IPPROTO_UDP);
#if 0
#if 0
		/* FIXME */
		/* FIXME */
		work->word2.s.dec_ipsec = 0;
		work->word2.s.dec_ipsec = 0;
@@ -630,8 +630,8 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
		/* No error, packet is internal */
		/* No error, packet is internal */
		work->word2.s.L4_error = 0;
		work->word2.s.L4_error = 0;
#endif
#endif
		work->word2.s.is_frag = !((ip_hdr(skb)->frag_off == 0)
		work->word2.s.is_frag = !((ip_hdr(skb)->frag_off == 0) ||
					  || (ip_hdr(skb)->frag_off ==
					  (ip_hdr(skb)->frag_off ==
					      1 << 14));
					      1 << 14));
#if 0
#if 0
		/* Assume Linux is sending a good packet */
		/* Assume Linux is sending a good packet */
+12 −12
Original line number Original line Diff line number Diff line
@@ -248,22 +248,22 @@ static int cvm_oct_common_change_mtu(struct net_device *dev, int new_mtu)
	 * Limit the MTU to make sure the ethernet packets are between
	 * Limit the MTU to make sure the ethernet packets are between
	 * 64 bytes and 65535 bytes.
	 * 64 bytes and 65535 bytes.
	 */
	 */
	if ((new_mtu + 14 + 4 + vlan_bytes < 64)
	if ((new_mtu + 14 + 4 + vlan_bytes < 64) ||
	    || (new_mtu + 14 + 4 + vlan_bytes > 65392)) {
	    (new_mtu + 14 + 4 + vlan_bytes > 65392)) {
		pr_err("MTU must be between %d and %d.\n",
		pr_err("MTU must be between %d and %d.\n",
		       64 - 14 - 4 - vlan_bytes, 65392 - 14 - 4 - vlan_bytes);
		       64 - 14 - 4 - vlan_bytes, 65392 - 14 - 4 - vlan_bytes);
		return -EINVAL;
		return -EINVAL;
	}
	}
	dev->mtu = new_mtu;
	dev->mtu = new_mtu;


	if ((interface < 2)
	if ((interface < 2) &&
	    && (cvmx_helper_interface_get_mode(interface) !=
	    (cvmx_helper_interface_get_mode(interface) !=
		CVMX_HELPER_INTERFACE_MODE_SPI)) {
		CVMX_HELPER_INTERFACE_MODE_SPI)) {
		/* Add ethernet header and FCS, and VLAN if configured. */
		/* Add ethernet header and FCS, and VLAN if configured. */
		int max_packet = new_mtu + 14 + 4 + vlan_bytes;
		int max_packet = new_mtu + 14 + 4 + vlan_bytes;


		if (OCTEON_IS_MODEL(OCTEON_CN3XXX)
		if (OCTEON_IS_MODEL(OCTEON_CN3XXX) ||
		    || OCTEON_IS_MODEL(OCTEON_CN58XX)) {
		    OCTEON_IS_MODEL(OCTEON_CN58XX)) {
			/* Signal errors on packets larger than the MTU */
			/* Signal errors on packets larger than the MTU */
			cvmx_write_csr(CVMX_GMXX_RXX_FRM_MAX(index, interface),
			cvmx_write_csr(CVMX_GMXX_RXX_FRM_MAX(index, interface),
				       max_packet);
				       max_packet);
@@ -302,8 +302,8 @@ static void cvm_oct_common_set_multicast_list(struct net_device *dev)
	int interface = INTERFACE(priv->port);
	int interface = INTERFACE(priv->port);
	int index = INDEX(priv->port);
	int index = INDEX(priv->port);


	if ((interface < 2)
	if ((interface < 2) &&
	    && (cvmx_helper_interface_get_mode(interface) !=
	    (cvmx_helper_interface_get_mode(interface) !=
		CVMX_HELPER_INTERFACE_MODE_SPI)) {
		CVMX_HELPER_INTERFACE_MODE_SPI)) {
		union cvmx_gmxx_rxx_adr_ctl control;
		union cvmx_gmxx_rxx_adr_ctl control;


@@ -354,8 +354,8 @@ static int cvm_oct_set_mac_filter(struct net_device *dev)
	int interface = INTERFACE(priv->port);
	int interface = INTERFACE(priv->port);
	int index = INDEX(priv->port);
	int index = INDEX(priv->port);


	if ((interface < 2)
	if ((interface < 2) &&
	    && (cvmx_helper_interface_get_mode(interface) !=
	    (cvmx_helper_interface_get_mode(interface) !=
		CVMX_HELPER_INTERFACE_MODE_SPI)) {
		CVMX_HELPER_INTERFACE_MODE_SPI)) {
		int i;
		int i;
		u8 *ptr = dev->dev_addr;
		u8 *ptr = dev->dev_addr;
@@ -428,8 +428,8 @@ int cvm_oct_common_init(struct net_device *dev)
	 * Force the interface to use the POW send if always_use_pow
	 * Force the interface to use the POW send if always_use_pow
	 * was specified or it is in the pow send list.
	 * was specified or it is in the pow send list.
	 */
	 */
	if ((pow_send_group != -1)
	if ((pow_send_group != -1) &&
	    && (always_use_pow || strstr(pow_send_list, dev->name)))
	    (always_use_pow || strstr(pow_send_list, dev->name)))
		priv->queue = -1;
		priv->queue = -1;


	if (priv->queue != -1)
	if (priv->queue != -1)